Thursday, 21 January 2016

Functions With a Return Value

<!DOCTYPE html>
<html>
<body>
<p>This example calls a function which performs a calculation, and returns the result:</p>
<p id="demo"></p>
<script>
function myFunction(a,b)
{return a*b;}
document.getElementById("demo").innerHTML=myFunction(4,3);
</script>
</body>

</html>

0 comments:

Post a Comment