Destructuring Flashcards

1
Q

What is destructuring, conceptually?

A

process of breaking a structure.
where we break down objects and arrays to their small components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the syntax for Object destructuring?

A

const {variable names in order} = objectName;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the syntax for Array destructuring?

A

const [array variable names] = arrayName;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you tell the difference between destructuring and creating Object/Array literals?

A

creating object and array literals has the object/ array name first right after the const let or var
while destructuring has it at the end before the ;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly