Manipulating Complex Objectsss

Manipulating Complex Objectsss
0.0 0

#1

Tell us what’s happening:
so confused

Your code so far

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

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

Link to the challenge:


#2

You are being asked:

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

The array already has one album object, you need to add another.

For example this is an array with one object:

var myPets = [
  {
    "name": "sparky",
    "species": "dog"
  }
]

and this is it with another object added:

var myPets = [
  {
    "name": "sparky",
    "species": "dog"
  }, // <-- remember the comma
  {
    "name": "fluffy",
    "species": "cat"
  }
]

Remember the comma after the first object.

This is basically what you have to do for this test. You can make up an album or even just cut and paste the Daft Punk album they have in the explanation text. The important thing is to add that new object into the array definition.