Math.random Last updated: 09. Jan 2023

Returns a number, decimal between 0 and 1.

Parameters

This function takes no parameters

Code example (#JS)

#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.
#Math.round(Math.random() * 100)#

Output

The #JS code above produces the output shown below:
70