Last active
October 12, 2015 18:31
-
-
Save sarfraznawaz2005/982dba5889cbd891ec41 to your computer and use it in GitHub Desktop.
Using length to truncate arrary
This file contains 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
var foo = [1, 2, 3, 4, 5, 6]; | |
foo.length = 3; | |
foo; // [1, 2, 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment