random

The Math.random() method returns a random number from 0 (inclusive) up to but not including 1 (exclusive).

Syntax

Math.random()

Returns

A random number from 0 (inclusive) up to but not including 1 (exclusive).

Parameters

None