Last active
January 31, 2018 18:48
-
-
Save bjvoth/3d8b6d2c9530fcc50a038fe6c8b49074 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
const surfboard = { | |
length: '6', | |
width: '20', | |
volume: '32' | |
} | |
{length, width} = surfboard | |
console.log(length) // '6' | |
console.log(width) // '20' | |
{brand} = surfboard | |
console.log(brand) // undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment