JS

Objects in JavaScript - Destructure an object in J...

2.

How do you destructure an object in JavaScript?

By using the object literal syntax { } and specifying the desired properties inside.

By using the spread operator ... followed by the object name.

By assigning the desired properties of the object to variables with the same names.

By using the destructuring assignment syntax with the object name followed by curly braces { }.