return the value of PI: - Javascript Function

Javascript examples for Function:Function Return

Description

return the value of PI:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
function myFunction() {//  w  ww.j  a  va2 s  .c o m
    return Math.PI;
}

document.getElementById("demo").innerHTML = myFunction();
</script>

</body>
</html>

Related Tutorials