Passing parameters to JavaScript files
I’d recommend not using global variables if possible. Use a namespace and OOP to pass your arguments through to an object. This code belongs in file.js: var MYLIBRARY = MYLIBRARY || (function(){ var _args = {}; // private return { init : function(Args) { _args = Args; // some other initialising }, helloWorld : function() … Read more