What about a method that clears the array and removes all the items.
At the moment I do:
base2.Javascript.bind(window);
if (!Array.prototype.clear) {
Array.prototype.clear = function() {
while (this.length > 0) {
this.pop();
}
}
}
would be cool to have the clear() method also "done" with the bind
statement. Well neither do I know if there is such a method coming from
Mozilla nor if this completly usefull and array = []; is the better clear.
What do you think?
Original issue reported on code.google.com by unigossi on 26 Dec 2007 at 11:04
Original issue reported on code.google.com by
unigossi
on 26 Dec 2007 at 11:04