# How to get the value of PI in JavaScript?

JavascriptWeb DevelopmentFront End Technology

To get the value of PI in JavaScript, use the Math.PI property. It returns the ratio of the circumference of a circle to its diameter, which is approximately 3.14159.

## Example

You can try to run the following code to get the value of PI in JavaScript −

<html>
</html>