I tried to push into an array I just created within an object using function
but it keeps returning numbers instead of the value pushed.
const recordCollection ={
5439: {
albumTitle: 'ABBA Gold'
}
}
function updateRecords(records, id, value){
records[id].track = [];
return records[id].track.push(value)
}
console.log(updateRecords(recordCollection, 5439,'ABBA'));
according to my code, my result is supposed to be 'ABBA' but it keeps returning the size of the array instead