Answers for "updating a key value on javascript object es6"

0

updating a key value on javascript object es6

var obj = {id: 1, name: "Adam"}
console.log(obj) // {id: 1, name: "Adam"}
obj = {...obj, name: "Eve"}
console.log(obj) // {id: 1, name: "Eve"}
Posted by: Guest on January-23-2021

Code answers related to "updating a key value on javascript object es6"

Code answers related to "Javascript"

Browse Popular Code Answers by Language