JavaScript Scratches

Math Constants (Properties)

There are 8 constant mathematical values available in JavaScript

  1. Math.E
    returns Euler's number
  2. Math.PI
    returns pi (π)
  3. Math.SQRT2
    returns sqaure root of 2
  4. Math.SQRT1_2
    returns square root of ½
  5. Math.LN2
    returns the natural logarithm of 2
  6. Math.LN10
    returns the natural logarithm of 10
  7. Math.LOG2E
    returns base 2 logarithm of E
  8. Math.LOG10E
    returns base 10 logarithm of E