Build JavaScript Objects 2

Tell us what’s happening:

It keeps saying error. I matched it to the example and it still said its wrong. I have tried for a long time and I believe I made an error somewhere. Please tell me where.

Your code so far


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

// Only change code below this line.

var myDog = { name
"name" : "Doggy",
"legs" : 4,
"tail" : 1,
"enemies" : ["leash", "people"]
  
  
};

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36.

var myDog = { name
  "name" : "Doggy",
  "legs" : 4,
  "tail" : 1,
  "enemies" : ["leash", "people"]
};

I can’t find the specific challenge, but on that first line:

  var myDog = { name

That word “name” all by itself will throw an error. There are situations where that would work, but I’m guessing this isn’t one of them.

1 Like