Creating Second Complex Object

Creating Second Complex Object
0.0 0

#1

Not sure what I am doing wrong. I am attempting to create multiple complex data structures. Any help?

Your code so far

var myMusic = [
  {
    "artist": "Billy Joel",
    "title": "Piano Man",
    "release_year": 1973,
    "formats": [ 
      "CS", 
      "8T", 
      "LP" ],
    "gold": true
  }
  
  {
    "artist": "Kanye West",
    "title": "Late Registration",
    "release_year": 2003,
    "formats": [
      "CD",
      "Vinyl",
      "MP3"
    ]
  }
  // Add record here
];


#2

It’s nice that you are asking the question in your own words, but you need to give us any error logs or what problem you’re actually facing so we can help you.


#4

My apologies,

SyntaxError: Unexpected token {

Q: Add a new album to the myMusic array. Add artist and title strings, release_year number, and a formats array of strings.

-none of the freeCodeCamp criteria for passing the problem are being satisfied.


#5

Arrays are collections of data separated by commas.

let pets = ["dog", "cat"];

You are missing a comma, which throws a syntax error because the next character is unexpected.


#6

Doooh! Thank you for the clarification.