Created
April 18, 2020 13:34
-
-
Save iceener/86b68092ea8d2ac00b5ebb46c6d44f40 to your computer and use it in GitHub Desktop.
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
// Destructuring | |
const args = [1, 2, 3, 4]; | |
const [a, b, c, d] = args; | |
console.log(a, b, c, d); | |
const coords = { x: 1, y: 10 }; | |
const { x: horizontal, y } = coords; | |
horizontal; /*?*/ | |
y; /*?*/ | |
const response = { data: { value: 5 } }; | |
function render({ data: { value } }) { | |
console.log(value); | |
} | |
render(response); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment