Eight read-only constants hold common irrational values as doubles.
| Constant | Value | Constant | Value |
|---|---|---|---|
| Math.PI | 3.14159 | Math.E (Euler's number) | 2.71828 |
| Math.SQRT2 | 1.41421 | Math.SQRT1_2 | 0.70711 |
| Math.LN2 | 0.69315 | Math.LN10 | 2.30259 |
| Math.LOG2E | 1.44308 | Math.LOG10E | 0.43429 |
const circleArea = r => Math.PI * r ** 2;
console.log(circleArea(5).toFixed(2), Math.E, Math.SQRT2 === Math.sqrt(2), typeof Math);78.54 2.718281828459045 true object