Object destructuring the method of extracting properties at
The problem it solves
Examples
Without destructuring
const car = {color: 'blue',model: 'ford',make: 'mustange'year: '1976'}const color = car.colorconst year = car.year
With desctructuring
const car = {color: 'blue',model: 'ford',make: 'mustange'year: '1976'}const {color, model, make year} = carconsole.log(color)// blue
Renaming In Destructure
const car = {color: 'blue',model: 'ford',make: 'mustange'year: '1976'}const { color: c, model: mo, make: ma, year: yr} = carconsole.log(mo)// ford
;(() => {// do stuff})()