wI'm unsure which is the better namespace convention to use.
var App = {}; // global variable, the root of our namespace
(function() {
App.something = function() {
}
})();
or
(function() {
window.App = {}; //global variable, the root of our namespace
App.something = function() {
}
})();
window.App and var App are both global variables so both conventions achieve the same outcome, but which is better?