Skip to content

Instantly share code, notes, and snippets.

@roy-bukapeta
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roy-bukapeta/070ba33b56039c010fde to your computer and use it in GitHub Desktop.
Save roy-bukapeta/070ba33b56039c010fde to your computer and use it in GitHub Desktop.
Remove array
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]
];
@aaiyo
Copy link

aaiyo commented Jun 16, 2015

delete data[1][0];

@aaiyo
Copy link

aaiyo commented Jun 16, 2015

delete data[1];

@roy-bukapeta
Copy link
Author

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