Which built-in object provides math constants like PI?

The story behind the answer

The Math built-in object provides mathematical constants such as Math.PI and functions such as Math.cos() and Math.sqrt(). Math.PI represents the ratio of a circle's circumference to its diameter.

Math is a special-purpose object rather than a constructor for ordinary mathematical values. Its properties and methods are accessed directly, so code can use Math.PI or Math.round(4.6) without creating a Math instance. Its trigonometric functions use radians rather than degrees.

The other options describe different built-in objects. Object is the general base object, String handles text values and related operations, and Number provides numeric conversion and number-related properties. Math.PI is not an exact mathematical fraction; JavaScript stores it as a floating-point approximation, roughly 3.141592653589793. Math also includes constants involving e, natural logarithms, and square roots.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: