Created
May 17, 2016 15:39
-
-
Save goldhand/16bf7307bd82174f2a33da1b086f90ed to your computer and use it in GitHub Desktop.
Example of destructuring deep objects in es6
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
let katdawg = { | |
kat: { | |
says: { | |
meow: '...' | |
} | |
}, | |
dawg: { | |
bark: 'woof' | |
} | |
} | |
let { kat: { says: { meow } }, dawg: { bark } } = katdawg; | |
console.log(meow, bark); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment