JavaScript JavaScript Basics Creating Reusable Code with Functions Giving Information to Functions

Upper

Why is he using "Upper"? What does that do?

1 Answer

Steven Parker
Steven Parker
170,451 Points

In this function, "upper" represents the parameter that is passed to the function to set the range of random numbers that will be produced. It's referred to as the "upper limit" which means that the random numbers picked by the function won't be any larger than that value.