Math object constants

Math.E   Euler's constant   e
Math.PI   π

A copy of the JavaScript functions in the head element:

// sample-7-math-constants.js
// This sample shows some Math constants

// display the input date in several formats
function display()
  {
  var output1 = document.getElementById("output1");
  var output2 = document.getElementById("output2");
  // Math object constants
  output1.value = Math.E;
  output2.value = Math.PI;
  }