2018-10-16 21:32:40 +05:30

451 B

title
title
Add New Properties to a JavaScript Object

Add New Properties to a JavaScript Object

Here's the example:

var ourDog = {
  "name": "Camper",
  "legs": 4,
  "tails": 1,
  "friends": ["everything!"]
};

ourDog.bark = "bow-wow";

Here's a solution:

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

// Only change code below this line.
myDog.bark = "woof";