<!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>