why this? it doesn’t make sense. First because you are checking if something is different from itself (always false), and second because collection.album is undefined
collection[id][prop] + create
nope.
one, the result is not assigned to anything
two, you can’t use + with arrays.
then, if else is not a thing: it’s else if
collection[prop] is undefined, as collection has numbers as property names. You need to use id somewhere to access the inner objects.
Your return collection is also outside of function body, so that is also an error.
try one thing at a time.
first, this:
Your function must always return the entire collection object.
the first thing in the challenge description is
then try to implement this, which is the first thing in the challenge description:
If prop isn’t "tracks" and value isn’t empty ( "" ), update or set the value for that record album’s property.
delete everything else in the function body and try to implement just this. You can pretty much follow what’s written.
after that, share with us, and then try the following paragraph.