Tell us what’s happening:
Can anyone tell me why the keys here (“artist”, “title”, etc) are enclosed in quotes? I was under the impression that keys didn’t get quotes. I also noticed that a few exercises after this exercise, the exercise for accessing nested arrays, that the keys are not enclosed in quotes. How do I know when to enclose keys in quotes and when not to? Thanks everyone for your time and input!
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": "Josh Ritter",
"title": "The Animal Years",
"release_year": 2006,
"formats": ["CD", "Digital"]
}
];
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:
https://www.freecodecamp.org/challenges/manipulating-complex-objects