Edit This Code:
See Result »
<!DOCTYPE html> <html> <body> <p>After a function has been stored in a variable, the variable can be used as a function:</p> <p id="demo"></p> <script> var x = function (a, b) {return a * b}; document.getElementById("demo").innerHTML = x(4, 3); </script> </body> </html>
Result: