Deep copy object using spread operator

PHOTO EMBED

Tue Oct 12 2021 13:32:02 GMT+0000 (UTC)

Saved by @hisam #javascript #spread #object #oop

const person = {
  name: 'Sam',
  age: 300,
}

const twinPerson = {
  ...person
}
content_copyCOPY