/*
Array Destructuring: The following example shows us how to convert all
the elements of an array to a variable.
Object Destructuring: The following example shows us how to convert all
the properties of an object into a variable.
*/
//Array Destructuring
const friends = ['Bill', 'Gates'];
const [firstName, secondName] = friends;
console.log(secondName); //Gates
//Object Destructuring
const person = {name: "Bill Gates", age: 17, phone: "123456789"};
const {name} = person;
console.log(name); //Bill Gates