recursal/MDN huggingface dataset:
Math.cosh()
===========

The **`Math.cosh()`** static method returns the hyperbolic cosine of a number. That is,


𝙼𝚊𝚝𝚑.𝚌𝚘𝚜𝚑
(
𝚡
)

=
cosh
(
x
)
=

e
x

+

e

−
x

2

\mathtt{\operatorname{Math.cosh}(x)} = \cosh(x) = \frac{\mathrm{e}^x + \mathrm{e}^{-x}}{2}

Try it
------

Syntax
------


```js
Math.cosh(x)
```

### Parameters

`x`

A number.

### Return value

The hyperbolic cosine of `x`.

Description
-----------

Because `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).

Examples
--------

### Using Math.cosh()


```js
Math.cosh(-Infinity); // Infinity
Math.cosh(-1); // 1.5430806348152437
Math.cosh(-0); // 1
Math.cosh(0); // 1
Math.cosh(1); // 1.5430806348152437
Math.cosh(Infinity); // Infinity
```

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.cosh |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Polyfill of `Math.cosh` in `core-js`
* `Math.acosh()`
* `Math.asinh()`
* `Math.atanh()`
* `Math.sinh()`
* `Math.tanh()`
Math.atan()
===========

The **`Math.atan()`** static method returns the inverse tangent (in radians) of a number, that is


𝙼𝚊𝚝𝚑.𝚊𝚝𝚊𝚗
(
𝚡
)

=
arctan
(
x
)
=
the unique 
y
∊

[

−

π
2

,

π
2

]

 such that 
tan
(
y
)
=
x

\mathtt{\operatorname{Math.atan}(x)} = \arctan(x) = \text{the unique } y \in \left[-\frac{\pi}{2}, \frac{\pi}{2}\right] \text{ such that } \tan(y) = x

Try it
------

Syntax
------


```js
Math.atan(x)
```

### Parameters

`x`

A number.

### Return value

The inverse tangent (angle in radians between 


-

π
2

-\frac{\pi}{2}

 and 


π
2

\frac{\pi}{2}

, inclusive) of `x`. If `x` is `Infinity`, it returns 


π
2

\frac{\pi}{2}

. If `x` is `-Infinity`, it returns 


-

π
2

-\frac{\pi}{2}

.

Description
-----------

Because `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).

Examples
--------

### Using Math.atan()


```js
Math.atan(-Infinity); // -1.5707963267948966 (-π/2)
Math.atan(-0); // -0
Math.atan(0); // 0
Math.atan(1); // 0.7853981633974483 (π/4)
Math.atan(Infinity); // 1.5707963267948966 (π/2)

// The angle that the line (0,0) -- (x,y) forms with the x-axis in a Cartesian coordinate system
const theta = (x, y) => Math.atan(y / x);
```


Note that you may want to avoid the `theta` function and use `Math.atan2()` instead, which has a wider range (between -π and π) and avoids outputting `NaN` for cases such as when `x` is `0`.

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.atan |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Math.acos()`
* `Math.asin()`
* `Math.atan2()`
* `Math.cos()`
* `Math.sin()`
* `Math.tan()`
Math.log()
==========

The **`Math.log()`** static method returns the natural logarithm (base e) of a number. That is



∀
x
>
0
,

𝙼𝚊𝚝𝚑.𝚕𝚘𝚐
(
𝚡
)

=
ln
(
x
)
=
the unique 
y
 such that 

e
y

=
x

\forall x > 0,;\mathtt{\operatorname{Math.log}(x)} = \ln(x) = \text{the unique } y \text{ such that } e^y = x

Try it
------

Syntax
------


```js
Math.log(x)
```

### Parameters

`x`

A number greater than or equal to 0.

### Return value

The natural logarithm (base e) of `x`. If `x` is ±0, returns `-Infinity`. If `x < 0`, returns `NaN`.

Description
-----------

Because `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).

If you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.

Beware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.

Examples
--------

### Using Math.log()


```js
Math.log(-1); // NaN
Math.log(-0); // -Infinity
Math.log(0); // -Infinity
Math.log(1); // 0
Math.log(10); // 2.302585092994046
Math.log(Infinity); // Infinity
```

### Using Math.log() with a different base

The following function returns the logarithm of `y` with base `x` (i.e. 


log
x

y

\log\_x y

):


```js
function getBaseLog(x, y) {
  return Math.log(y) / Math.log(x);
}
```


If you run `getBaseLog(10, 1000)`, it returns `2.9999999999999996` due to floating-point rounding, but still very close to the actual answer of 3.

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.log |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Math.exp()`
* `Math.log1p()`
* `Math.log10()`
* `Math.log2()`
* `Math.pow()`
Math.sin()
==========

The **`Math.sin()`** static method returns the sine of a number in radians.

Try it
------

Syntax
------


```js
Math.sin(x)
```

### Parameters

`x`

A number representing an angle in radians.

### Return value

The sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.

Description
-----------

Because `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).

Examples
--------

### Using Math.sin()


```js
Math.sin(-Infinity); // NaN
Math.sin(-0); // -0
Math.sin(0); // 0
Math.sin(1); // 0.8414709848078965
Math.sin(Math.PI / 2); // 1
Math.sin(Infinity); // NaN
```

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.sin |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Math.acos()`
* `Math.asin()`
* `Math.atan()`
* `Math.atan2()`
* `Math.cos()`
* `Math.tan()`
Math.sqrt()
===========

The **`Math.sqrt()`** static method returns the square root of a number. That is



∀
x
≥
0
,

𝙼𝚊𝚝𝚑.𝚜𝚚𝚛𝚝
(
𝚡
)

=

x

=
the unique 
y
≥
0
 such that 

y
2

=
x

\forall x \geq 0,;\mathtt{\operatorname{Math.sqrt}(x)} = \sqrt{x} = \text{the unique } y \geq 0 \text{ such that } y^2 = x

Try it
------

Syntax
------


```js
Math.sqrt(x)
```

### Parameters

`x`

A number greater than or equal to 0.

### Return value

The square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.

Description
-----------

Because `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).

Examples
--------

### Using Math.sqrt()


```js
Math.sqrt(-1); // NaN
Math.sqrt(-0); // -0
Math.sqrt(0); // 0
Math.sqrt(1); // 1
Math.sqrt(2); // 1.414213562373095
Math.sqrt(9); // 3
Math.sqrt(Infinity); // Infinity
```

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.sqrt |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Math.cbrt()`
* `Math.exp()`
* `Math.log()`
* `Math.pow()`
Math.LOG2E
==========

The **`Math.LOG2E`** static data property represents the base 2 logarithm of e, approximately 1.442.

Try it
------

Value
-----


𝙼𝚊𝚝𝚑.𝙻𝙾𝙶𝟸𝙴
=

log
2

(
e
)
≈
1.442

\mathtt{\mi{Math.LOG2E}} = \log\_2(\mathrm{e}) \approx 1.442



| Property attributes of `Math.LOG2E` |
| --- |
| Writable | no |
| Enumerable | no |
| Configurable | no |

Description
-----------

Because `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).

Examples
--------

### Using Math.LOG2E

The following function returns the base 2 logarithm of e:


```js
function getLog2e() {
  return Math.LOG2E;
}

getLog2e(); // 1.4426950408889634
```

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.log2e |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Math.exp()`
* `Math.log()`
* `Math.log2()`
Math.LOG10E
===========

The **`Math.LOG10E`** static data property represents the base 10 logarithm of e, approximately 0.434.

Try it
------

Value
-----


𝙼𝚊𝚝𝚑.𝙻𝙾𝙶𝟷𝟶𝙴
=

log
10

(
e
)
≈
0.434

\mathtt{\mi{Math.LOG10E}} = \log\_{10}(\mathrm{e}) \approx 0.434



| Property attributes of `Math.LOG10E` |
| --- |
| Writable | no |
| Enumerable | no |
| Configurable | no |

Description
-----------

Because `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).

Examples
--------

### Using Math.LOG10E

The following function returns the base 10 logarithm of e:


```js
function getLog10e() {
  return Math.LOG10E;
}

getLog10e(); // 0.4342944819032518
```

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.log10e |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Math.exp()`
* `Math.log()`
* `Math.log10()`
Math.round()
============

The **`Math.round()`** static method returns the value of a number rounded to the nearest integer.

Try it
------

Syntax
------


```js
Math.round(x)
```

### Parameters

`x`

A number.

### Return value

The value of `x` rounded to the nearest integer.

Description
-----------

If the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.

**Note:** This differs from many languages' `round()` functions, which often round half-increments *away from zero*, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.

`Math.round(x)` is not exactly the same as `Math.floor(x + 0.5)`. When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.

Because `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).

Examples
--------

### Using round


```js
Math.round(-Infinity); // -Infinity
Math.round(-20.51); // -21
Math.round(-20.5); // -20
Math.round(-0.1); // -0
Math.round(0); // 0
Math.round(20.49); // 20
Math.round(20.5); // 21
Math.round(42); // 42
Math.round(Infinity); // Infinity
```

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.round |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Number.prototype.toPrecision()`
* `Number.prototype.toFixed()`
* `Math.abs()`
* `Math.ceil()`
* `Math.floor()`
* `Math.sign()`
* `Math.trunc()`
Math.abs()
==========

The **`Math.abs()`** static method returns the absolute value of a number.

Try it
------

Syntax
------


```js
Math.abs(x)
```

### Parameters

`x`

A number.

### Return value

The absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.

Description
-----------

Because `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).

Examples
--------

### Using Math.abs()


```js
Math.abs(-Infinity); // Infinity
Math.abs(-1); // 1
Math.abs(-0); // 0
Math.abs(0); // 0
Math.abs(1); // 1
Math.abs(Infinity); // Infinity
```

### Coercion of parameter

`Math.abs()` coerces its parameter to a number. Non-coercible values will become `NaN`, making `Math.abs()` also return `NaN`.


```js
Math.abs("-1"); // 1
Math.abs(-2); // 2
Math.abs(null); // 0
Math.abs(""); // 0
Math.abs([]); // 0
Math.abs([2]); // 2
Math.abs([1, 2]); // NaN
Math.abs({}); // NaN
Math.abs("string"); // NaN
Math.abs(); // NaN
```

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.abs |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Math.ceil()`
* `Math.floor()`
* `Math.round()`
* `Math.sign()`
* `Math.trunc()`
Math.cos()
==========

The **`Math.cos()`** static method returns the cosine of a number in radians.

Try it
------

Syntax
------


```js
Math.cos(x)
```

### Parameters

`x`

A number representing an angle in radians.

### Return value

The cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.

Description
-----------

Because `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).

Examples
--------

### Using Math.cos()


```js
Math.cos(-Infinity); // NaN
Math.cos(-0); // 1
Math.cos(0); // 1
Math.cos(1); // 0.5403023058681398
Math.cos(Math.PI); // -1
Math.cos(2 \* Math.PI); // 1
Math.cos(Infinity); // NaN
```

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.cos |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Math.acos()`
* `Math.asin()`
* `Math.atan()`
* `Math.atan2()`
* `Math.sin()`
* `Math.tan()`
Math.SQRT1\_2
=============

The **`Math.SQRT1_2`** static data property represents the square root of 1/2, which is approximately 0.707.

Try it
------

Value
-----


𝙼𝚊𝚝𝚑.𝚂𝚀𝚁𝚃𝟷\_𝟸
=

1
2

≈
0.707

\mathtt{\mi{Math.SQRT1\_2}} = \sqrt{\frac{1}{2}} \approx 0.707



| Property attributes of `Math.SQRT1_2` |
| --- |
| Writable | no |
| Enumerable | no |
| Configurable | no |

Description
-----------

`Math.SQRT1_2` is a constant and a more performant equivalent to `Math.sqrt(0.5)`.

Because `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).

Examples
--------

### Using Math.SQRT1\_2

The following function returns 1 over the square root of 2:


```js
function getRoot1\_2() {
  return Math.SQRT1\_2;
}

getRoot1\_2(); // 0.7071067811865476
```

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.sqrt1\_2 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Math.pow()`
* `Math.sqrt()`
Math.cbrt()
===========

The **`Math.cbrt()`** static method returns the cube root of a number. That is


𝙼𝚊𝚝𝚑.𝚌𝚋𝚛𝚝
(
𝚡
)

=

x
3

=
the unique 
y
 such that 

y
3

=
x

\mathtt{\operatorname{Math.cbrt}(x)} = \sqrt[3]{x} = \text{the unique } y \text{ such that } y^3 = x

Try it
------

Syntax
------


```js
Math.cbrt(x)
```

### Parameters

`x`

A number.

### Return value

The cube root of `x`.

Description
-----------

Because `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).

Examples
--------

### Using Math.cbrt()


```js
Math.cbrt(-Infinity); // -Infinity
Math.cbrt(-1); // -1
Math.cbrt(-0); // -0
Math.cbrt(0); // 0
Math.cbrt(1); // 1
Math.cbrt(2); // 1.2599210498948732
Math.cbrt(Infinity); // Infinity
```

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.cbrt |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Polyfill of `Math.cbrt` in `core-js`
* `Math.pow()`
* `Math.sqrt()`
Math.max()
==========

The **`Math.max()`** static method returns the largest of the numbers given as input parameters, or -`Infinity` if there are no parameters.

Try it
------

Syntax
------


```js
Math.max()
Math.max(value1)
Math.max(value1, value2)
Math.max(value1, value2, /\* …, \*/ valueN)
```

### Parameters

`value1`, …, `valueN`

Zero or more numbers among which the largest value will be selected and returned.

### Return value

The largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns -`Infinity` if no parameters are provided.

Description
-----------

Because `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).

`Math.max.length` is 2, which weakly signals that it's designed to handle at least two parameters.

Examples
--------

### Using Math.max()


```js
Math.max(10, 20); // 20
Math.max(-10, -20); // -10
Math.max(-10, 20); // 20
```

### Getting the maximum element of an array

`Array.prototype.reduce()` can be used to find the maximum
 element in a numeric array, by comparing each value:


```js
const arr = [1, 2, 3];
const max = arr.reduce((a, b) => Math.max(a, b), -Infinity);
```


The following function uses `Function.prototype.apply()` to get the maximum of an array. `getMaxOfArray([1, 2, 3])` is equivalent to `Math.max(1, 2, 3)`, but you can use `getMaxOfArray()` on programmatically constructed arrays. This should only be used for arrays with relatively few elements.


```js
function getMaxOfArray(numArray) {
  return Math.max.apply(null, numArray);
}
```


The spread syntax is a shorter way of writing the `apply` solution to get the maximum of an array:


```js
const arr = [1, 2, 3];
const max = Math.max(...arr);
```


However, both spread (`...`) and `apply` will either fail or return the wrong result if the array has too many elements, because they try to pass the array elements as function parameters. See Using apply and built-in functions for more details. The `reduce` solution does not have this problem.

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.max |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Math.min()`
Math.min()
==========

The **`Math.min()`** static method returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.

Try it
------

Syntax
------


```js
Math.min()
Math.min(value1)
Math.min(value1, value2)
Math.min(value1, value2, /\* …, \*/ valueN)
```

### Parameters

`value1`, …, `valueN`

Zero or more numbers among which the lowest value will be selected and returned.

### Return value

The smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.

Description
-----------

Because `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).

`Math.min.length` is 2, which weakly signals that it's designed to handle at least two parameters.

Examples
--------

### Using Math.min()

This finds the min of `x` and `y` and assigns it to `z`:


```js
const x = 10;
const y = -20;
const z = Math.min(x, y); // -20
```

### Clipping a value with Math.min()

`Math.min()` is often used to clip a value so that it is always less than or
 equal to a boundary. For instance, this


```js
let x = f(foo);

if (x > boundary) {
  x = boundary;
}
```


may be written as this


```js
const x = Math.min(f(foo), boundary);
```


`Math.max()` can be used in a similar way to clip a value at the other end.

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.min |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `Math.max()`
Math.random()
=============

The **`Math.random()`** static method returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.

**Note:** `Math.random()` *does not* provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `window.crypto.getRandomValues()` method.

Try it
------

Syntax
------


```js
Math.random()
```

### Parameters

None.

### Return value

A floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).

Examples
--------

Note that as numbers in JavaScript are IEEE 754 floating point numbers with round-to-nearest-even behavior, the ranges claimed for the functions below (excluding the one for `Math.random()` itself) aren't exact. If extremely large bounds are chosen (253 or higher), it's possible in *extremely* rare cases to reach the usually-excluded upper bound.

### Getting a random number between 0 (inclusive) and 1 (exclusive)


```js
function getRandom() {
  return Math.random();
}
```

### Getting a random number between two values

This example returns a random number between the specified values. The returned value is no lower than (and may possibly equal) `min`, and is less than (and not equal) `max`.


```js
function getRandomArbitrary(min, max) {
  return Math.random() \* (max - min) + min;
}
```

### Getting a random integer between two values

This example returns a random *integer* between the specified values. The value is no lower than `min` (or the next integer greater than `min` if `min` isn't an integer), and is less than (but not equal to) `max`.


```js
function getRandomInt(min, max) {
  min = Math.ceil(min);
  max = Math.floor(max);
  return Math.floor(Math.random() \* (max - min) + min); // The maximum is exclusive and the minimum is inclusive
}
```


**Note:** It might be tempting to use `Math.round()` to accomplish that, but doing so would cause your random numbers to follow a non-uniform distribution, which may not be acceptable for your needs.

### Getting a random integer between two values, inclusive

While the `getRandomInt()` function above is inclusive at the minimum, it's exclusive at the maximum. What if you need the results to be inclusive at both the minimum and the maximum? The `getRandomIntInclusive()` function below accomplishes that.


```js
function getRandomIntInclusive(min, max) {
  min = Math.ceil(min);
  max = Math.floor(max);
  return Math.floor(Math.random() \* (max - min + 1) + min); // The maximum is inclusive and the minimum is inclusive
}
```

Specifications
--------------

| Specification |
| --- |
| ECMAScript Language Specification # sec-math.random |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `window.crypto.getRandomValues()`