Manipulating Complex Objects, What's wrong?

Manipulating Complex Objects, What's wrong?
0

#1

Tell us what’s happening:
I don’t know what going on here, I have created the myMusic[1] but still get a null when I run the test.
Please can someone help me out with this challenge.

Thanks

Your code so far

var myMusic = [
  {
    "artist": "Billy Joel",
    "title": "Piano Man",
    "release_year": 1973,
    "formats": [ 
      "CS", 
      "8T", 
      "LP" ],
    "gold": true
  }
  // Add record here
[
    {
    "artist": "Fela Kuti",
    "title": "African man's mentality",
    "release_year": 1986,
    "formats": [
      "mp3",
      "mp2",
      "ogg",
      "WMA"
    ]
    
  }
] 
  
];

Your browser information:

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

Link to the challenge:


#2

You don’t wrap the new record in a pair of []. Then since myMusic is an array, the values in it should be separated by a comma. You don’t have one after the first object.


#3

You must remove the big bracket in the second element of the array and put a comma after //Add record here. I am sure that would help you out.


#4

Thanks everyone… I solved it.

var myMusic = [
{
“artist”: “Billy Joel”,
“title”: “Piano Man”,
“release_year”: 1973,
“formats”: [
“CS”,
“8T”,
“LP” ],
“gold”: true
},
// Add record here

{
“artist”: “Fela”,
“title”: “Na me be the boss”,
“release_year”: 2020,
“formats”: [
“mp3”,
“mp2”,
“mp1”
]

}

];