Nona Urbiz Nona Urbiz - 1 year ago 75
Javascript Question

Is JavaScript's array.clear() not a function?

I'm trying to empty an array containing my drawn coordinates when a button "clear" is pressed.

When I call

, I get an error that it is not a function.
is certainly an array, and I have Firebug
s printing things out. It's hosted here.

Answer Source

Nope, it's not. But drawnDivs.length = 0 should work.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download