Javascript examples for Function:Function Variable
Using function context vs passing as parameter
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w ww .jav a 2s .c o m async(console.log, "This will display later."); console.log("This will display first."); function async(funct) { setTimeout.bind(null, funct, 0).apply(null, [].slice.call(arguments, 1)); } } </script> </head> <body> </body> </html>