Nona Urbiz Nona Urbiz - 11 months ago 51
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.