Random Whole Numbers

Do I need to define math.randomn under local scope.  I'm under the impression that it cant take any parameters ?

Your code so far

var randomNumberBetween0and19 = Math.floor(Math.random() * 20);

function randomWholeNum() {

  // Only change code below this line.
 Math.floor()        Math.randomn()*10

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36.

Link to the challenge:

Math.random() generates a pseudo-random number between 0.0 and 1.0

So calling Math.random() thee times, you might get


A random floating point number between 0 and 1. That whole Math framework is part of JS, you have it as part of the lannguage.

But if you Math.floor() a num between 0 and 1, what do you think will happen? Instead, you need to figure a way to scale tthat random num into your desired range.

Why do you think it doesn’t take parameters ? Look at the example, look at the documentation