myMusic should have at least two elements! What does it mean? Where is my mistake?

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

  **Your code so far**

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

  **Your browser information:**

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

Challenge: Manipulating Complex Objects

Link to the challenge:

Your myMusic is an array containing one element. Then there’s another array with one element in it.

You should remove this ; from between the 2 arrays that contain the 2 objects and replace it with comma ‘,’
Then it should be one big array containing 2 objects and comma between them, not 2 big arrays with an objects in each of them, because you’ll need one bigger array to contain the 2 arrays if you wanna do that.
It’s should be like this:

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

It worked! Thank you so much! Appreciate your help!

1 Like

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