Cannot integrate Math.floor to randomNumber


Not allowing me to work Math.floor into random.Number. Im anaged to get randomNumber to work correctly, but cannot integrate Math.floor.

Did you wrap Math.random() * 100 with Math.floor()?

var randomNumber = Math.random = Math.floor (8.6) * 100 ;



Is this for the exercise or you'r just playing around with it?


You set a variable to two different things in the same line. If you're trying to run Math.floor on Math.random, use this syntax.

var randomNumber = Math.floor(Math.random() * 100);


It works now. Thank you for your time.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.