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: Number, representing PI.
JavaScript version: ECMAScript 1

Browserv understøttelse

Math.PI Er en ES1-funktion (JavaScript 1999). Alle browsere understøtter det fuldt ud:

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

Relaterede sider

Læringsguide:JavaScript matematik