Return the product of a and b from a function - Javascript Function

Javascript examples for Function:Function Return

Description

Return the product of a and b from a function

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

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

<script>
function myFunction(a, b) {
    return a * b;
}

document.getElementById("demo").innerHTML = myFunction(4, 3);
</script>/*from ww w . j a  v  a  2  s  . c  om*/

</body>
</html>

Related Tutorials