3 ms·
Nothing vastly new here (especially if you've watched Douglas Crockford's videos) although I must admit I quite like the local var global = this; concept fo
by pmjordan 18y ago
Nothing vastly new here (especially if you've watched Douglas Crockford's videos) although I must admit I quite like the local
var global = this;
concept for when you're creating more than one element in the global namespace/object. The reason you wouldn't use window is of course that your code will port to non-browser platforms, and you don't use unqualified names because they look like a mistake (e.g. you left the 'var' off)