ES6-Destructuring Flashcards
1
Q
What is destructuring, conceptually?
A
Destructuring is when you assign properties of objects and elements of arrays to individual variables
2
Q
What is the syntax for Object destructuring?
A
let { property1: variable1, property2: variable2 } = object;
3
Q
What is the syntax for Array destructuring?
A
let [x, y, z] = arrayName;
4
Q
How can you tell the difference between destructuring and creating Object/Array literals?
A