Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

Number.prototype.toPrecision()

2 tags 1 category

The toPrecision() method of Number values returns a string representing this number to the specified number of significant digits.

Return value: A string representing the given number, using the given number of significant digits. Scientific notation is used if the exponent is greater than or equal to precision or less than -6. Has the same behavior as Number.prototype.toString() if the precision argument is omitted.

Parameters: precision An integer specifying the number of significant digits.

Syntax example: toPrecision()

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…