0 points

How to merge two objects in JavaScript


dashboard

Thu Jul 23 2020 05:59:59 GMT+0000 (UTC)

Posted by @nikhil3790 #javascript

const object1 = {
  name: 'Flavio'
}

const object2 = {
  age: 35
}

const object3 = {...object1, ...object2 }
content_copy Copy

https://flaviocopes.com/how-to-merge-objects-javascript/