No, people use "private" because they are wrong and should say "local"
Local variables are defined as
var foo = "local";
global variables are properties of the object of the global scope (in the browser window )
window.foo = "global";
The fact that you can do foo = "global"; without first assigning the variable foo with var foo is an โerrorโ. This is fixed in ES5 strict mode.
(function () { "use strict"; foo = 42; })()
gives ReferenceError: foo is not defined
Note that you can make variables global by declaring them in the outer scope
var foo = "global"; function bar() { var foo = "local"; }
It should be noted that you should not have any code in the external area. You must wrap your entire scope with anonymous functions to get a โmodule level scopeโ. This means that you have a file-based top-level area. This is part of the module template.
Raynos
source share