Hello,
I’m not sure how to fix this code:
// Only change code below this line
function updateRecords(records, id, prop, value) {
if (value === ""){
delete records[id][prop];
}
else if (prop !== "tracks" && value !== "") {
records[id][prop] == value;
}
else if (prop == "tracks" && value !== "" && records[id].hasOwnProperty("tracks") === false) {
records[id][prop] = [value];
records[id][prop].push(value);
}
return records;
}
updateRecords(recordCollection, 5439, 'artist', 'ABBA');
Link to the lesson: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/record-collection
Thanks!