Created
October 22, 2019 05:20
-
-
Save MidasXIV/aedf2e178955330713a9d66d2d7d1aaf to your computer and use it in GitHub Desktop.
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 arr = [10, 20]; | |
let one, two; | |
[one, two] = arr; | |
console.log(`${one} ${two}`); | |
let obj = { prop1: 'mxiv', prop2: 'UAE' }; | |
let name, location; | |
({ prop1: name, prop2: location } = obj); | |
console.log(`${name} ${location}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment