JavaScript Tutorial/Number Data Type/toPrecision
Demonstrating the toPrecision() method
<source lang="javascript">
<html> <head> <title>Demonstrating the toPrecision() method</title> <script type="text/javascript" language="javascript">
</script> </head> <body onload="DisplayPrecision()">
This listing demonstrates the use of the toPrecision() method.
</body> </html></source>