Please login to start chat

ICT Solutions 22 Jun 2022, 09:44:51
Category : JavaScript Tutorials

Math.PI (JS Math)

<!DOCTYPE html>
<html>
<head>
<title>JavaScript Code Testing</title>
</head>
<body>
<p id = "demo1">This is JavaScript Math.PI Testing</p>
<button type = "button" onclick = "jsPI()">Math PI</button>
<script>
function jsPI(){
var pi = Math.PI;
document.getElementById("demo1").innerHTML = pi;
}
</script>
</body>
</html>

Comments:

No comment to show.

Available Services
Download Android Application