Manipulating Complex Objects challenge

Manipulating Complex Objects challenge
0

#1

Tell us what’s happening:

Below is my code and its not working.
What’s wrong with it?

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": "Chris Brown",
      "title": "Forever",
      "release_year": 2007,
      "formats": [
        "CD",
        "8T",
        "LP"],
        "gold": true
    
  
];

Your browser information:

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

Link to the challenge:


#2

Each album should be an object. Your code (shown below) is not an object. It needs to be surround by some special characters to make it an object. Look at the first album to see the correct syntax. Also, myMusic is an array of objects. How do you separate elements in an array?

      "artist": "Chris Brown",
      "title": "Forever",
      "release_year": 2007,
      "formats": [
        "CD",
        "8T",
        "LP"],
        "gold": true

#3

Thanks alot randelldawson
I solved the problem
I should’ve included the special characters like in the first album also add a comma after the closing curly bracket of the first album to separate the elements in the array


#4

A post was split to a new topic: Help with function that calculates average color