JavaScript PI property
Example
Returns PI:
Math.PI;
Output result:
3.141592653589793
Try it »
Definition and Usage
The PI property is pi, the ratio of a circle's circumference to its diameter. Its value is approximately 3.14.
Browser support





All major browsers support the PI property.
Syntax
Math.PI
Technical Details
| Return Value: | Returns pi (approximately 3.14159). |
|---|---|
| JavaScript version: | 1.0 |
JavaScript Math object