I'm trying to empty an array containing my drawn coordinates when a button "clear" is pressed. When I call drawnDivs.clear(), I get an error that it is not a function. drawnDivs is certainly an array, and I have firebug console.logs printing things out. It's hosted here.
This will work if it's a true array, and not just an array-like object.
thomasrutter
2010-10-26 03:54:29
@thomasrutter. True but it will preserve references and any other addition properties and functions defined on the array.
Jordan
2010-10-26 04:13:44
@Jordan yes, this is still the best solution overall. And to be honest, it would still work on array-like objects, it just wouldn't free any of the existing members from memory right away. So only a minor point really.
thomasrutter
2010-10-26 12:43:38