freeCodeCamp Challenge Guide: Create a Basic JavaScript Object

Create a Basic JavaScript Object


Problem Explanation

The soultion to this problem is more or less identical to the example given.
Give the dog object two new properties - name and numLegs - and set them to a string and a number, respectively.


Solutions

Solution 1 (Click to Show/Hide)
let dog = {
  name: "George",
  numLegs: 4
};
3 Likes