Mega Code Archive

 
Categories / JavaScript DHTML / Language Basics
 

Explicit Conversion Functions

<HTML> <HEAD> <TITLE>Using Explicit Conversion Functions</TITLE> </HEAD> <BODY> <H1 ALIGN="CENTER">Using Explicit Conversion Functions</H1> <SCRIPT LANGUAGE="JavaScript"><!-- document.write('eval("12.34*10") = ') document.write(eval("12.34*10")) document.write("<BR>") document.write('parseInt("0x10") = ') document.write(parseInt("0x10")) document.write("<BR>") document.write('parseFloat("5.4321e6") = ') document.write(parseFloat("5.4321e6")) // --></SCRIPT> </BODY> </HTML>