js update object keep values code example
Example: JavaScript: Updating Object Properties
var myDog = {
"name": "Coder",
"legs": 4,
"tails": 1,
"friends": ["freeCodeCamp Campers"]
};
// Update the name value
myDog.name = "Happy Coder";
var myDog = {
"name": "Coder",
"legs": 4,
"tails": 1,
"friends": ["freeCodeCamp Campers"]
};
// Update the name value
myDog.name = "Happy Coder";