I moved your question to its own topic because you were asking a question related to your own code for a challenge and were not answering the OP of the other thread. It is always best to create your own thread for you specific question(s). Also, it is advisable to use the Ask for Help button on the challenge, so it auto-populates with your current code and the challenge url.
It doesn’t “choose”. That’s not how programming works. Just because there are two objects defined in the code there, that doesn’t mean that the program has to guess which one to use.
half is a function. The function accepts one argument, an object. To make the function work, to make it do anything, it has to be called, passing it an object.
half doesn’t do anything on its own, that’s not how functions work. What’s there is the definition of the function. You call it like half(stats) or half(stats1) – it doesn’t choose one to run against, it is given one of the objects.
I’m mainly confused because when I run that code, It logs “56.78 -0.75” into the console. So in this case it would have to be choosing one of the variables, right? thanks for your help .
Oh! You have to pass the object into the function. Still getting used to the arrow function formatting. It’s throwing me off. Thank you. I think i get it now.