Javascript examples for Function:Function Definition
After a function expression has been stored in a variable, the variable can be used as a function:
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var x = function (a, b) {return a * b}; document.getElementById("demo").innerHTML = x(4, 3); </script>/*from ww w. j a va 2 s .c o m*/ </body> </html>