Math.random

Returns a pseudorandom number greater than 0 and less than 1.

Syntax

random()

Note

Calcish uses a cryptographically secure random number generator for Math.random(). This may not be true for other environments, so is recommended to use methods from crypto to generate cryptographically secure random numbers when needed.

See also

Examples

Since it returns random numbers, your results will differ from example results.

Math.random()
0.8703880598681935