Add New Properties to a JavaScript Object
Solutions
Solution 1 (Click to Show/Hide)
const myDog = {
name: "Happy Coder",
legs: 4,
tails: 1,
friends: ["freeCodeCamp Campers"]
};
// Only change code below this line.
myDog.bark = "woof";
const myDog = {
name: "Happy Coder",
legs: 4,
tails: 1,
friends: ["freeCodeCamp Campers"]
};
// Only change code below this line.
myDog.bark = "woof";