422 B
422 B
title |
---|
Math Random |
Math Random
Math.random()
returns a number between 0 (inclusive) and 1 (exclusive).
Syntax
Math.random()
Example
function randomInRange(min, max) {
return Math.random() * (max - min) + min;
}