Nicholas Wallen12,278 Points
Why is upper put in the parenthesis at the top of the code?
I understand what the whole code does, just not that specific part:
var upper = 10000; var randomNumber = getRandomNumber(upper); var guess; var attempts = 0;
Explain like I am 5 what using upper as the argument does.
Steven Parker174,115 Points
Any time you call a function, you put parentheses after the name. if the function requires one or more arguments, they are put inside those parentheses.
In this case, the "upper" argument given to "getRandomNumber" determines the upper limit on the random number that is returned by the function.