If you declare a variable in closure after the function definition calls this variable, it still uses the scope variable.
function ShowMe() { alert(myVar);
This process will get another level of complexity with respect to the namespace.
In addition, there are numerous namespace methods along with expand / applyIf, etc., which can perform many functions. namespace () in ExtJS or $ .extend in jQuery, for example. Thus, it may be nice to have, but it is not an absolute need for language constructs. I believe that formalizing some extensions for Array and supporting ISO-8601 dates in Date is much more important. To just check every namespace layer to determine ...
window.localization = $.extend(window.localization || {}, { ... }); window.localization.en = $.extend(window.localization.en || {}, { ... });
Tracker1
source share