From http://www.w3schools.com (Copyright Refsnes Data)

JavaScript PI Property


Math Object Reference JavaScript Math Object

Definition and Usage

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

Syntax

Math.PI


Example

Example

Return PI:

<script type="text/javascript">

document.write("PI: " + Math.PI);

</script>

The output of the code above will be:

PI: 3.141592653589793

Try it yourself »


Math Object Reference JavaScript Math Object

From http://www.w3schools.com (Copyright Refsnes Data)