Mega Code Archive

 
Categories / JavaScript DHTML / Language Basics
 

Using Floating-Point Numbers

<HTML> <HEAD> <TITLE>Using floating-point numbers</TITLE> </HEAD> <BODY> <SCRIPT LANGUAGE="JavaScript"> <!-- document.write(-4.321) document.write("<BR>") document.write(55.) document.write("<BR>") document.write(12e2) document.write("<BR>") document.write(1e-2) document.write("<BR>") document.write(7e1) document.write("<BR>") document.write(-4e-4) document.write("<BR>") document.write(.5) // --> </SCRIPT> </BODY> </HTML>