mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-15 15:07:28 -05:00
422 B
422 B
title
| 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;
}