Learn Create Your Own Split Screen

Next Page

But Scratch lets us choose a random number in a range (like between 1 and 10). How can you do that with Javascript?

The following code produces a number greater than or equal to zero, and always less than twenty.

var thing = Math.random() * 20;
After this line of code, the 'thing' variable might contain values similar to the following:

       0.19287346 
       7.5243 
       19.993873 
       3.00003873