xxxxxxxxxx
// Using the Math.PI constant in JavaScript
console.log(Math.PI); // Prints the value of pi (approximately 3.141592653589793) to the console
xxxxxxxxxx
function calculateCircumference(radius) {
return 2 * Math.PI * radius;
}
console.log(Math.PI);
// expected output: 3.141592653589793
console.log(calculateCircumference(10));
// expected output: 62.83185307179586
xxxxxxxxxx
//pi declare pi= MATH.PI
var pi = MATH.PI;
//console
console.log(pi);
//screen
document.write(pi);