I\'ve seen tons of posts about the difference between global and function scope in JavaScript, far too many to link here. I\'ve also seen my exact question asked about Pyth
There is no standard to do that. For my own purposes, I always put my variables in a container where the name resembles the project name:
var PROJECT = {}; // Put all "globals" for "project" into this container
That way, I can collect all variables in one place and if I need to pass the "globals" around, I have to pass at most one reference.