first, dot notation search for an exact match for the name, as there is no property named “prop” in the object, collection.prop is undefined, undefined values do not have properties and trying to access properties on undefined values give an error - so you get an error when you try to do collection.prop["id"] gives an error
there is a way in which you can use a variable to access a property value, but it is not that one.
Also, consider what are the properties of the collection object, and what are the values that the prop variable can have - do they match?
I was trying to match what parameter was passed as arguements, so the id become the number, prop becomes the key and value becomes the value, if that make sense?
Are you saying, we need to hard code inside the function ?
but look carefully at the collection object, what properties does it have?
you are not proficient with objects but you need to become, take this challenge as a chance to learn how to work with objects - but you will also need to review stuff
for example, how to access properties with a variable