Here is the sample code which destructures an array and object. Reference code:
For arrays we can give any name we want, but while destructuring objects we can give only object property names.

Alternate option for destructuring objects:
Here is the sample code which destructures an array and object. Reference code:
For arrays we can give any name we want, but while destructuring objects we can give only object property names.
Alternate option for destructuring objects: