I've learned that using globals is a bad idea in Javascript because there's the risk of collisions with dependencies.
Can I use var
at the global scope as an alternative to this? I want to avoid the pitfalls of globals, but doing this seems much easier than passing along all my custom objects as parameters to functions. I have objects which are partially defined in many different files.