Manipulating Complex Objects Help!

Manipulating Complex Objects Help!
0

#1

Tell us what’s happening:
I could not understand how to solve this.
Can someone help please?

Your code so far

var myMusic = [
  {
    "artist": "Billy Joel",
    "title": "Piano Man",
    "release_year": 1973,
    "formats": [ 
      "CS", 
      "8T", 
      "LP" ],
    "gold": true
  }
];    
  var myMusic1= [
  {
    "artist":"Justin",
    "title": "ABC",
        "release_year": 2010,
    "formats": [ 
      "CS", 
      "8T", 
      "LP" ],
    "gold": true

    
  }
  // Add record here
];

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36.

Link to the challenge:


#2

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

You start with an array called myMusic which has one object (the object represents an album). Instead of creating a new array (myMusic1) with one album object, you just need to take the album object you created (below):

  {
    "artist":"Justin",
    "title": "ABC",
        "release_year": 2010,
    "formats": [ 
      "CS", 
      "8T", 
      "LP" ],
    "gold": true 
  }

and add it to the existing myMusic array as a 2nd element. Remember, elements in arrays are separated by a comma, so you need to put a comma between the two objects (albums).


#3

Solved. Thanks. I was missing a comma.