Latest

recent

JavaScript PI Property

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

<script type="text/javascript">
document.write("PI: " + Math.PI);
</script>

The output of the code above will be:

PI: 3.141592653589793
JavaScript PI Property Reviewed by 1000sourcecodes on 03:03 Rating: 5
Powered by Blogger.