I’ve been stuck on “Manipulating Complex Objects” for awhile, but when I changed the provided code, it went through?
Here’s the original:
var myMusic = [
{
"artist": "Billy Joel",
"title": "Piano Man",
"release_year": 1973,
"formats": [
"CS",
"8T",
"LP" ],
"gold": true
}
// Add record here
];
Note the right bracket and semicolon after the “// Add record here”.
I kept getting errors about identifiers, and couldn’t get my code to pass until I moved the right bracket and semicolon up, above my code, like this:
var myMusic = [
{
"artist": "Billy Joel",
"title": "Piano Man",
"release_year": 1973,
"formats": [
"CS",
"8T",
"LP" ],
"gold": true
}
];// Add record here
myMusic.push(
{"artist": "Devo", "title": "We are Devo", "release_year": 1984, "formats": ["CD", "Cassette", "LP"]}
);
I’m so used to not touching code until where it’s indicated I should that I didn’t touch the right bracket and semicolon until I finally started trying everything.
Were the right bracket and semicolon in the wrong place? Or was there a different way to do this with them where they started?
Thanks for your help!