Question 13
Back to Exercise
Which value can be destructured with an array pattern?
- A A plain object { a: 1 }
- B null
- C A number
- D A Set Correct
Correct Answer: Option D
Array patterns work with any iterable: arrays, strings, Maps, Sets, generators. Plain objects, null and numbers are not iterable.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!