Sobes.tech
Junior — Senior

Extracting object fields through destructuring

livecode

Task condition

It is necessary to demonstrate how to use destructuring assignment to obtain individual properties from a given object.

let person = {
  name: 'Igor',
  age: 19,
  city: 'Petersburg'
};

// example of destructuring
const { name, age, city } = person;