Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Statements</h1>
<h2>The return Statement</h2>
<p>Call a function that returns the value of PI:</p>
<p id="demo"></p>
<script>
function myFunction() {
  return Math.PI;
}
document.getElementById("demo").innerHTML = myFunction();
</script>
</body>
</html>