Glad to see you went to the trouble to create something to explain one method of emptying an array. Too bad you decided to name your example array "array" - Never, ever use an example name that is the same as the type of thing you are trying to demonstrate - it's very difficult to figure out what mentions of array refer to the example variable or the command. Experts will know, but they aren't your target audience.
your code is not workingJohn April 4, 2011 at 12:20 PM
your code is not working, ha ha aa haaaa
Javascript Clear FunctionNick November 16, 2011 at 8:05 PM
With regards to your Javascript Array Clear post, Javascript does not have a clear() function, therefore this code does not work.
?Pierre June 8, 2012 at 4:39 PM
Be sure to type before use : Array.prototype.clear=function() { this.length = 0; }; ....
please revise for claritytwisted September 24, 2012 at 2:38 AM
Glad to see you went to the trouble to create something to explain one method of emptying an array. Too bad you decided to name your example array "array" - Never, ever use an example name that is the same as the type of thing you are trying to demonstrate - it's very difficult to figure out what mentions of array refer to the example variable or the command. Experts will know, but they aren't your target audience.
Post your Comment