Skip to content

Instantly share code, notes, and snippets.

@kopasetik
Created January 21, 2016 20:54
Show Gist options
  • Save kopasetik/030f1fa5544f38372ebe to your computer and use it in GitHub Desktop.
Save kopasetik/030f1fa5544f38372ebe to your computer and use it in GitHub Desktop.
Javascript destructuring and elision
// elision AKA skipping array elements
let [b, , , , , a] = ['Robin!', 'Nana', 'nana', 'nana', 'nana', 'Batman!']
console.log(a) //=> Batman!
console.log(b) //=> Robin!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment