Tell us what’s happening:
Describe your issue in detail here.
Hi everyone, I have a fast question about the theory behind this question/coding challenge. I was super stumped on this, and I still am regarding the ‘records’ component of this. I’m not seeing anywhere…
let ‘records’ = “”
or
let ‘records’ = “recordCollection”.
I’m feeling confused because I’m not sure where the ‘records’ object even came from. I see we’re passing it through the updateRecords function, but I’m still confused what ‘records’ even refers to, as it’s not been assigned a value, and in the hints, they are not assigning the object ‘records’ a value either.
This is kind of a weird question because I just need a leg up understanding where the ‘records’ object came from and how we’re supposed to use it. I hope that makes sense, and thank you for your help!
**Your code so far**
// Setup
const recordCollection = {
2548: {
albumTitle: 'Slippery When Wet',
artist: 'Bon Jovi',
tracks: ['Let It Rock', 'You Give Love a Bad Name']
},
2468: {
albumTitle: '1999',
artist: 'Prince',
tracks: ['1999', 'Little Red Corvette']
},
1245: {
artist: 'Robert Palmer',
tracks: []
},
5439: {
albumTitle: 'ABBA Gold'
}
};
// Only change code below this line
function updateRecords(records, id, prop, value) {
return records;
}
updateRecords(recordCollection, 5439, 'artist', 'ABBA');
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Record Collection
Link to the challenge: