Basic JavaScript - Build JavaScript Objects

Tell us what’s happening:
Describe your issue in detail here.
it keeps say syntax error and i really don’t know where I went wrong

   **Your code so far**
const myDog = {
 // Only change code below this line

var myDog = {
"name": "Olive",
"legs": 4,
"tails": 1,
"friends": [5]




 // Only change code above this line
};
   **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Build JavaScript Objects

Link to the challenge:

HI @peri.long !

The issue is that you are trying to create an object called myDog inside an object already called myDog

Get rid of this part and the test will pass

1 Like

Tell us what’s happening:
Describe your issue in detail here.
No clue this time honestly

  **Your code so far**
const myDog = {
// Only change code below this line

var myDog = {
"name": "Olive",
"legs": 4,
"tails": 1,
"friends": 




// Only change code above this line
};
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Build JavaScript Objects

Link to the challenge:

Someone just asked a very similar question about this step. Search the forum and the previous posts will help you.

Searching the forum is good advice, but a key philosophy here is that we are OK answering the same questions for anyone who asks.

You declared your variable inside of your variable declaration. That cannot be correct.

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