Why does this not work?

Why does this not work?
0

#1

Tell us what’s happening:

Your code so far

var myMusic = [
  {
    "artist": "Billy Joel",
    "title": "Piano Man",
    "release_year": 1973,
    "formats": [ 
      "CS", 
      "8T", 
      "LP" ],
    "gold": true
  }];
  [
    {
    "artist": "Jimmy John",
    "title": "Insert Album Title Here",
    "release_year": 1995,
    "formats": [
      "CS",
      "8T",
      "LP"],
      "gold": false
}];

Your browser information:

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

Link to the challenge:


#2

The code:

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

creates an array with one object (album).
The rest of the code looks like another array, but it is not assigned to anything, so myMusic still only has one object in it after the code runs.

  [
    {
    "artist": "Jimmy John",
    "title": "Insert Album Title Here",
    "release_year": 1995,
    "formats": [
      "CS",
      "8T",
      "LP"],
      "gold": false
}];

When you get this challenge correct, you will have one array with two objects. It will look similar to this:

var oneArray = [
  {
    // object #1 property/value pairs will go here.
  },
  
  {
    // object #2 property/value pairs will go here.
  }
];

#3

@RandellDawson Thank you so much, I still am surprised how often I am stumped by something so simple.