Basic JavaScript - Manipulating Complex Objects

Tell us what’s happening:
Describe your issue in detail here.
what’s wrong? it’s say “SyntaxError: unknown: Missing semicolon. (15:10)”
Your code so far

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

Your browser information:

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

Challenge: Basic JavaScript - Manipulating Complex Objects

Link to the challenge:

The square bracket is prematurely ending the array.

You only use that type of bracket at the end of the of the array, not in the middle.

i can’t figure out . “gold”: true is set in that way for default and still saying error.

This is the original code, true?

You are asked to add an object to this array.

The code should be added above the last square bracket, not below it.

I hope this helps.

1 Like

I understand a little bit right, anyways i pass the challenge, so thank you for commenting

if you have a follow-up question let me know.
Remember arrays are whatever is in the square brackets like
[1, 2, 3]

so to add something to an array, you have to go within the brackets to add it
(whether it is a simple array like this one or a more complex one)

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