Edit This Code:
<!DOCTYPE html>
<html>
<body>

<p>A function can be stored in a variable:</p>
<p id="demo"></p>

<script>
var x = function (a, b) {return a * b};
document.getElementById("demo").innerHTML = x;
</script>

</body>
</html>




Result:
Try it Yourself - © w3schools.com
Privacy Policy