AI

Destructuring allows you to unpack values from arrays or properties from objects into distinct variables. It makes extracting data much cleaner!

Your Task:

  • Use object destructuring to extract name and age from the user object
  • Use array destructuring to extract firstColor and secondColor from the colors array
TypeScript Solution
Loading...

Submit your code to see test results