Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

merge two objects javascript

const object1 = {
  name: 'Flavio'
}

const object2 = {
  age: 35
}
const object3 = {...object1, ...object2 } //{name: "Flavio", age: 35}
Source by flaviocopes.com #
 
PREVIOUS NEXT
Tagged: #merge #objects #javascript
ADD COMMENT
Topic
Name
9+3 =