The Math PI static property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.
console.log(Math.PI);
// 3.141592653589793
// common, more-advanced example
// calculate the circumference of a circle
function calculateCircumference(radius) {
return 2 * Math.PI * radius;
}
const circleCircumference = calculateCircumference(10));
console.log(circleCircumference);
// 62.83185307179586