Last active
August 29, 2015 14:23
-
-
Save roy-bukapeta/070ba33b56039c010fde to your computer and use it in GitHub Desktop.
Remove array
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 data = [ | |
[2001, 2524.85], | |
[2002, 1400.12], | |
[2003, 234.32] | |
]; | |
// Bagaimana cara menghapus index 2002 ? | |
// Result | |
var data = [ | |
[2001, 2524.85], | |
[2003, 234.32] | |
]; |
delete data[1];
Kalau berdasarkan value bagaimana om? parameter yang di dapat value 2002.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
delete data[1][0];