JavaScript Math.PI
Definition and Usage
Math.PI returns PI (the ratio of a circle's area to the square of its radius, approximately 3.14)
Browser Support
Math.PI
is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |
Syntax
Math.PI
Return Value
A number representing PI. |