Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Updating Object Properties

var myDog = {
  "name": "Coder",
  "legs": 4,
  "tails": 1,
  "friends": ["freeCodeCamp Campers"]
};

myDog.name = "Happy Coder"
console.log(myDog.name);
//or
myDog["name"] = "Happy Coder"
console.log(myDog["name"]);
Source by www.dyn-web.com #
 
PREVIOUS NEXT
Tagged: #Updating #Object #Properties
ADD COMMENT
Topic
Name
2+2 =