Javascript examples for Object:Module
Passing arguments into the Module
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <script type="text/javascript"> var GlobalModule = (function() { function consoleLog(textToOutput) { console.log(textToOutput); }// w w w .j a v a 2s . c o m return { consoleLog: consoleLog }; })(); GlobalModule.consoleLog('Hello') </script> </body> </html>