Number

Methods

isFinite(value) → {Boolean} static

Determines whether the passed value is a finite number.

Parameters:

NameTypeDescription
valueNumber

The value to be tested for finiteness.

Returns:

A Boolean indicating whether or not the given value is a finite number.

isInteger(value) → {Boolean} static

Determines whether the passed value is an integer.

Parameters:

NameTypeDescription
valueNumber

The value to be tested for being an integer.

Returns:

A Boolean indicating whether or not the given value is an integer.

isNaN(value) → {Boolean} static

Determines whether the passed value is NaN and its type is Number. It is a more robust version of the original, global isNaN().

Parameters:

NameTypeDescription
valueNumber

The value to be tested for NaN.

Returns:

true if the given value is NaN and its type is Number; otherwise, false.

random(min, max) → {Number} static

Produces a random number between the inclusive lower and upper bounds.

Parameters:

NameTypeDescription
minNumber

Lower boundary.

maxNumber

Upper boundary.

Returns:

The random number.

toFixed(precision) → {String}

Returns a string representation of a number that does not use exponential notation and has exactly precision digits after the decimal place.

Parameters:

NameTypeDescription
precisionNumber

Amount of digits to use after the decimal place.

Returns:

The string representation of the number with exactly precision digits after the decimal place.