Tell us what’s happening:
SyntaxError: unknown: Unexpected token, expected “]” (14:10)
Your code so far
var myMusic = [
{
"artist": "Billy Joel",
"title": "Piano Man",
"release_year": 1973,
"formats": [
"CD",
"8T",
"LP"
],
"gold": true
}
// Add a record here
["artist": "Beethoven",
"title": "Sonata",
"release_year": 1800,
"formats": [
"hello": "world"
] }
];
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
.
Challenge: Manipulating Complex Objects
Link to the challenge:
ilenia
2
first thing, you need to put a comma between elements inside an array
around here after the }
there needs to be a comma
second, an object starts with a {
, yours starts with a [
2 Likes
"artist": "Beethoven",
"title": "Sonata",
"release_year": 1800,
"formats": [
"hello": "world"
],
}
ilenia
4
if you have updated your code, and you still need help, please post again your whole code
var myMusic = [
{
"artist": "Billy Joel",
"title": "Piano Man",
"release_year": 1973,
"formats": [
"CD",
"8T",
"LP"
],
"gold": true
}
// Add a record here
{
"artist": "Beethoven",
"title": "Sonata",
"release_year": 1800,
"formats": [
"hello": "world"
],
}
ilenia
6
the comma is still missing
missing is also the closing ]
of the myMusic
array