Javascript examples for Function:Function Variable
Create a function by assign the function to a value
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w w w. j a v a 2s . c o m hello = function() { // this is the same as function hello() { } console.log('hi'); }; hello(); // call it like a normal function :) } </script> </head> <body> </body> </html>