This is depressing

I honestly dont know what is wrong. i have tried copy and pasting, changing curly brackets around, and other stuff. am i going crazy. i didnt watch the video.

  **Your code so far**

const myMusic = [
{
  "artist": "Billy Joel",
  "title": "Piano Man",
  "release_year": 1973,
  "formats": [
    "CD",
    "8T",
    "LP"
  ],
  "gold": true,
  {
  "artist": "Billy Joel",
  "title": "Piano Man",
  "release_year": 1973,
  "formats": [
    "CD",
    "8T",
    "LP"
  ],
  "gold": true
  }
}
];
  **Your browser information:**

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

Challenge: Manipulating Complex Objects

Link to the challenge:

I tried this as well. Maybe i have misspelled something. i dont know.
Your code so far


const myMusic = [
{
  "artist": "Billy Joel",
  "title": "Piano Man",
  "release_year": 1973,
  "formats": [
    "CD",
    "8T",
    "LP"
  ],
  "gold": true
}

  "artist": "Michael Jackson",
  "title": "Billy Jean",
  "release_year": 1982,
  "formats": [
    "CD",
    "8T",
    "LP"
  ],
  "gold": true
}
];
  **Your browser information:**

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

Challenge: Manipulating Complex Objects

Link to the challenge:

You are almost there, take a closer look at the number and positioning of curly brackets. myMusic should be an array, with at least two elements, being objects in the array. The overview how that would look is:

[
    { /* object 1 */ },
    { /* object 2 */ }
]

Where object 1 is the example already in the array in the seed code, and object 2 is the one that’s added, to solve the challenge.

Try looking at it this way.

const  array = [{object},{object}]

and if you break it down further

const array = [{key1:value1,key2:value2},{key1:value1,key2:value2}]

Every object in the array should be enclosed in { } and separated by a comma ,
every key:value pair in the object separated by a comma ,

I think if you start counting { } braces and their placement in your code you will find your answer.

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