Destructuring Assignment Interview Questions – Destructuring Assignment (Objects & Arrays) Online Quiz

Question 1:  What is destructuring assignment in JavaScript?

Question 2:  What symbol is used to destructure an array in JavaScript?

Question 3:  What symbol is used to destructure an object in JavaScript?

Question 4:  Which of the following syntax is correct for destructuring an object?

Question 5:  What will be the value of y after const {x, y} = {x: 5, y: 10}?

Question 6:  What happens if you try to destructure a property that does not exist in the object?

Question 7:  Can you assign default values while destructuring?

Question 8:  What is the result of destructuring an empty array?

Question 9:  Which statement is true about nested destructuring?

Question 10:  Is it possible to rename variables while destructuring an object?

Leave a Reply