Tryit Editor v2.3

Edit This Code:
<!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> <!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_function_expression_variable by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:36:19 GMT --> </html>
Result:
Try it Yourself - © w3schools.com