Math.E Euler's constant e
Math.PI π
// 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; }