Destructuring

Array Destructuring:

// packing
let numbers = [1, 2, 3, 4, 5];

// unpacking
let [a, b, , c] = numbers;
console.log(a, b, c); // 1 2 4

Object Destructuring:

// pack
ing
let person={
    name:"Vignesh",
    age:19
};
// unpacking
let {name,age}=person;
console.log(name,age); // Vignesh 19