Understand logic but not parameters


I get how and why the code works, but I'm not sure how the Choice 1 and Choice 2 parameters for the compare function know the values of the userChoice and computerChoice variables.

I hope this makes sense.




choice1 and choice2 are just variable names inside the function. You could call then a and b, for example. But the value that they hold is the one you passed to the function call.


Its clicked now.