Hi, I’ve been stuck in this code challenge for several days. I have read all the posts about it and I didn’t get anything. The explanation given in the challenge is not very enlightening. This is my code right now and with this I don’t get any green check.

You need to check for the value being passed. An empty value means you are expected to delete a property. Add a value checker to your first if-condition:if (value && prop === 'tracks' && collection[id]['tracks'] === undefined)

When you want to use a variable reference an object property, you MUST use the bracket notation. Change all the occurences of collection.id[prop] to collection[id][prop]. Also, since only the property tracks is an array, just set the properties with the = operator. Don’t use the Array method .push.

These are actually two different expressions. If value is a blank string, then it would be a “falsy” value which would render then entire if statement as false, so as long as value has anything other than an empty string and the other two conditions evaluate to true, then the if statement evaluates to true also.

No. Because in this case, tracks is not an empty array. The last condition in your if-statement makes the whole block false.collection[id]['tracks'] === undefined
Therefore, it does not run the first statement for that case.