Mega Code Archive

 
Categories / JavaScript Tutorial / Number Data Type
 

Demonstrating the toExponential() method

< html> <head> <title>Demonstrating the toExponential() method</title> <script type="text/javascript" language="javascript"> <!-- // function CreateExponentials(){     number = new Number(123456789);     for (var i=0; i<5; i++){         document.write(number.toExponential(i) + "<br/>");     } } // --> </script> </head> <body onload="CreateExponentials()"> <P>This listing demonstrates the use of the toExponential() method.</p><br /> </body> </html>