Lesson Store Multiple Values in one Variable using JavaScript Arrays

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
const myDog = {
// Only change code below this line
var myDog = {
  "name": "Fido",
  "legs": 4,
  "tails": 1,
  "freinds": ["Spot", "Rover"]




// Only cshange code above this line
};

I do not understand why this code will not pass. It seems to be set up correctly, but I am missing something.

Any ideas?

  **Your browser information:**

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

Challenge: Build JavaScript Objects

Link to the challenge:

in the object myDog you have wrongly spelled friends and you don’t have to declare object myDog again it is done for you you just have to add the attribute key value pair in it like

const obj = {
    attribute : value
};

I hope you understand what am i trying to say😅

That makes sense, thank you.

Here’s the code now, but I still cannot pass.

myDog = {
    "name": "Fido",
    "legs": 4,
    "tails": 1,
    "friends": ["Spot", "Rover"]




  // Only cshange code above this line
};

Just add
[solution redacted]
in your code nothing else :stuck_out_tongue:

var myDog = {
“name”: “Fido”,
“legs”: 4,
“tails”: 1,
“friends”: [“Spot”, “Rover”]

// Only change code above this line
};

This code gives me multiple errors.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.