myfunction
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Functions</h2>
<p>calculator function example</p>
<label>Result:</label>
<p id="fnc"></p>
<script>
function myFunction(p1, p2) {
return p1 * p2;
}
document.getElementById("fnc").innerHTML = myFunction(2, 3);
</script>
</body>
</html>