1  <HTML>
  2  
  3  <HEAD>
  4  <TITLE>JavaScript Example:  Math Properties</TITLE>
  5  </HEAD>
  6  
  7  <BODY BGCOLOR="#FFFFFF">
  8  
  9  <H2>Math properties (constants)</H2>
 10  
 11  <PRE>
 12  <SCRIPT LANGUAGE="JavaScript">
 13  <!-- hide script from old browsers
 14  
 15  with(Math) {
 16    document.writeln("E       = " + E);
 17    document.writeln("LN10    = " + LN10);
 18    document.writeln("LN2     =  " + LN2);
 19    document.writeln("LOG10E  =  " + LOG10E);
 20    document.writeln("LOG2E   = " + LOG2E);
 21    document.writeln("PI      = " + PI);
 22    document.writeln("SQRT1_2 =  " + SQRT1_2);
 23    document.writeln("SQRT2   = " + SQRT2);
 24  }
 25  
 26  // end script hiding -->
 27  </SCRIPT>
 28  </PRE>
 29  
 30  </BODY>
 31  </HTML>