Manipulating Complex Objects Exercise Help

Manipulating Complex Objects Exercise Help
0

I have tried everything but I cannot figure out why my code is not working for this exercise:


var myMusic = [
  {
    "artist": "Billy Joel",
    "title": "Piano Man",
    "release_year": 1973,
    "formats": [
      "CD",
      "8T",
      "LP"
    ],
    "gold": true
  }
  // Add record here
    {
    "artist": "U2",
    "title": "Joshua Tree",
    "release_year": 1985,
    "formats": [
      "CD",
      "8T",
      "LP"
    ],
  }
];

I receive this error:

SyntaxError: unknown: Unexpected token, expected "," (14:4)

  12 |   }
  13 |   // Add record here
  14 |     {
        |     ^
  15 |     "artist": "U2",
  16 |     "title": "Joshua Tree",
  17 |     "release_year": 1985,

You miss a comma , at the end of line 12 and there is no need for it in line 22.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.