Understand logic but not parameters


#1

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.

Thanks,

Chris.


#2

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.


#3

Its clicked now.

Thanks