JavaScript PI Property

Definition and Usage

PI The property is π, which is the ratio of the circumference of a circle to its diameter. This value is approximately 3.141592653589793.

Example

Returns PI:

Math.PI;

Try It Yourself

Syntax

Math.PI

Technical Details

Return Value: A number representing PI.
JavaScript Version: ECMAScript 1

Browser Support

Math.PI Is an ES1 feature (JavaScript 1999). All browsers fully support it:

Chrome IE Edge Firefox Safari Opera
Support Support Support Support Support Support

Related Pages

Tutorial:JavaScript Math