X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

JavaScript PI Property

Math Object Reference JavaScript Math Object

Example

Return PI:

Math.PI;

The result will be:

3.141592653589793

Try it yourself »


Definition and Usage

The PI property returns the ratio of a circle's area to the square of its radius, approximately 3.14


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The PI property is supported in all major browsers.


Syntax

Math.PI

Technical Details

Return Value: A Number, representing PI
JavaScript Version: 1.0


Math Object Reference JavaScript Math Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook