+ 1

Javascript Math.floor and Math.random!

what's the difference between Math.floor and Math.random ? I'm lost

27th Jan 2017, 12:11 PM
Abdessamad Chrouki
Abdessamad Chrouki - avatar
2 odpowiedzi
+ 3
Math.random() <- This thing creates a random number between 0 and 1. Math.floor(3.14) <- This thing is 3.
27th Jan 2017, 2:20 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 1
aah now I get it . thanks :))
27th Jan 2017, 7:08 PM
Abdessamad Chrouki
Abdessamad Chrouki - avatar