But I don’t understand why. My problem was the following code:
(prop === "tracks" && value !== "" && !records[id].hasOwnProperty("tracks"))
// Type error: .hasOwnProperty is not a function.
(prop === "tracks" && value !== "" && !records[id].hasOwnProperty(`tracks`))
// Then I changed "tracks" to `tracks` and I passed all tests.
I thougth there is no difference between ““ and `` in a string, isn’t it?
Why is .hasOwnProberty with `tracks` a function but with “tracks” not?
Edit: If I change my code in VS Code it still says .hasOwnProberty is not a function whether with ““ or ``.
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Challenge Information:
Build a Record Collection - Build a Record Collection