Destructuring
?A way to store object properties into variables separate from the object.
Extra Reading:
Wesbos
MDN
Example:
// Object
const person = {
first: 'Wes',
last: 'Bos',
country: 'Canada',
city: 'Hamilton',
twitter: '@wesbos'
};
const first = person.first;
const last = person.last;
// Object Destructuring
const { first, last } = person;
// What the above returns
console.log(first); // Wes
console.log(last); // Bos