What is going wrong with that code;
Your code so far
var myMusic = [
{
"artist": "Billy Joel",
"title": "Piano Man",
"release_year": 1973,
"formats": [
"CD",
"8T",
"LP"
],
"gold": true
},
// Add record here
{
"artist" : "2pac",
"title" : "All Eyes On Me",
"release_year" : 1993,
"formates" : [
"CS",
"LP",
"MP3"
]
}
];
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/manipulating-complex-objects
What typo i have wrong because i don’t understand
myMusic[1] should contain a formats property which is an array
Cannot read property ‘every’ of undefined
It tell me that below my code.
var myMusic = [
{
“artist”: “Billy Joel”,
“title”: “Piano Man”,
“release_year”: 1973,
“formats”: [
“CD”,
“8T”,
“LP”
],
“gold”: true
},
// Add record here
{
“artist” : “2pac”,
“title” : “All Eyes On Me”,
“release_year” : 1993,
“formates”: [
“CS”,
“LP”,
“MP3”
]
}
];
this is my code so far but i don’t no what is going wrong.
var myMusic = [
{
“artist”: “Billy Joel”,
“title”: “Piano Man”,
“release_year”: 1973,
“formats”: [
“CS”,
“8T”,
“LP” ],
“gold”: true
}
];// Add record here
myMusic.push(
{“artist”: “2pac”,
“title”: “All Eyes on Me”,
“release_year”: 1984,
“formats”: [
“CD”, “Cassette”, “LP”]
}
);
That i believe it is right