Demonstrating the toExponential() method : toExponential « Number Data Type « JavaScript Tutorial






<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>








5.19.toExponential
5.19.1.Demonstrating the toExponential() method