Number.toPrecision()
<html> <head> <title>Number properties</title> </head> <body> <script type="text/javascript"> var newValue = new Number("4.8896"); document.writeln(newValue.toPrecision(3) + "<br />"); </script> </body> </html>