What do they mean by two elements?
I have used bracket notation to add objects to myMusic. I do not seem to understand what they mean by adding two elements. do i create another variable inside of myMusic? Please elaborate
Your code so far
const myMusic = [
{
"artist": "Billy Joel",
"title": "Piano Man",
"release_year": 1973,
"formats": [
"CD",
"8T",
"LP"
],
"gold": true
}
];
myMusic["artist"]="Aaliyah";
myMusic["title"]="I Care 4 U";
myMusic["release_year"]=2000;
myMusic["formats"]=["CD", "8T", "LP"];
console.log(myMusic);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0
Challenge: Basic JavaScript - Manipulating Complex Objects
Link to the challenge: