Last active
August 29, 2015 14:20
-
-
Save wtfil/ef7ac96a0641c9833a95 to your computer and use it in GitHub Desktop.
es6 destructuring
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
function someAction({x, y, z}) { | |
console.log('x:', x); | |
console.log('y:', y); | |
console.log('z:', z); | |
} | |
someAction({ | |
y: 1, | |
z: 2 | |
}); | |
// x: undefined | |
// y: 1 | |
// z: 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment