xxxxxxxxxx
Object Destructuring =>
//
The destructuring assignment syntax is a JavaScript expression that makes it
possible to unpack values from arrays,
or properties from objects, into distinct variables.
//
example:
const user = {
id: 42,
is_verified: true
};
const {id, is_verified} = user;
console.log(id); // 42
console.log(is_verified); // true
xxxxxxxxxx
In JavaScript, destructuring is when you decompose the properties of an object or the indexes of an array to separate them to create specific variables. This does not mean that these separated objects or arrays can never be used again in the program.