/

HTML / CSS / JavaScript Tutorial

JavaScript Math method: random()

[this page | pdf | back links]

The random() method (of the Math object) returns a (uniform) random number between 0 (inclusive) and 1 (not inclusive).

 

It has the following syntax (with no parameters):

 

Math.random()

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript Numbers and Math


Desktop view | Switch to Mobile