I have a global object APP
which I use as a namespace for variables and functions in my applicaton:
var window.APP = {};
Does it make sense to "declare" variables in this namespace before assigning them?
var APP.myvar = null;
APP.myvar = new Cls();
Or should I forget using var
and just add properties when required to my APP
object?