Put in order · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects
Array Destructuring - Element Order
Arrange what will be assigned to variables in the destructuring const [a, , b] = ['Rex', 'Blue', 'Delta']:
Items to put in order
- a = 'Rex'
- b = 'Delta'
- 'Blue' is skipped
Show the answer
Correct order:
- a = 'Rex'
- 'Blue' is skipped
- b = 'Delta'