Created
November 17, 2012 18:01
-
-
Save felixzapata/4098274 to your computer and use it in GitHub Desktop.
how to empty an array in JavaScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // http://stackoverflow.com/questions/1232040/how-to-empty-an-array-in-javascript | |
| // related: Splicing is the worst by far: http://jsperf.com/emptying-arrays/4 | |
| matrix.splice(0,matrix.length); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment