Need help figuring this one out

Tell us what’s happening:
It keeps giving me a error but I have everything matched up. Really lost. It keeps underlining “artist” in red. Im not seeing the problem.

Your code so far


var myMusic = [
{
  "artist": "Billy Joel",
  "title": "Piano Man",
  "release_year": 1973,
  "formats": [
    "CD",
    "8T",
    "LP"
  ],
  "gold": true
}
  "artist": "Dr Dre",
  "title": "The Chronic",
  "release_year": 1992,
  "formats": [
    "CD",
    "Cassette",
    "LP"
  ],
  "gold": true
];

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15.

Challenge: Manipulating Complex Objects

Link to the challenge:

You have two small issues.

  1. You haven’t wrapped this object is {}s

  2. You don’t have a comma between your two objects (commas are needed between items in arrays)

1 Like

Ok now it has a arrow behind the last curly bracket. Semi-colon?

What’s your current code?

var myMusic = [
  {
    "artist": "Billy Joel",
    "title": "Piano Man",
    "release_year": 1973,
    "formats": [
      "CD",
      "8T",
      "LP"
    ],
    "gold": true
  },
  {
    "artist": "Dr Dre",
    "title": "The Chronic",
    "release_year": 1992,
    "formats": [
      "CD",
      "Cassette",
      "LP"
    ],
    "gold": true
}```

It looks like your closing ] went missing?

1 Like