Function parameters Record Tracks

Hi, I did post this question in Discord but I think I wasn’t very clear on what I was asking. So in reference to the record tracks challenge, is prop a function parameter for “tracks”?
I’m struggling to figure out how it runs with just prop === tracks
how does it know that prop === tracks?

Objects are a collection of properties. The properties have a name, a key, and some value. In this case the prop parameter is the name (key) of a property to pass to the function

function example(obj, prop) {
  return `the value the property ${prop} is ${obj[prop]}`;

example({ firstname: "Dan", lastname: "Couper" }, "firstname")
// Returns "the value of the property firstname is Dan"

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.