Destructuring in Javascript
Destructuring assignment, introduced in ES6, lets you unpack values from arrays and properties of objects and save them into distinct variables. Destructuring assignment allows you to assign the properties of an array or object to variables using syntax that looks similar to an…