Introduction
The Math.random()
function returns a floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive)..
Math.random()
The following code gets a random number between 0 (inclusive) and 1 (exclusive)
console.log(Math.random());
PreviousNextRelated