What does this mean?

Feb 8, 2012 at 12:35 AM


This code from mstats.layoutManager.js  widget. Yes. I know that is name space and $ sign why your team did some thing like that.

} (this.mstats = this.mstats || {}, jQuery));


Because it is different from othe

} (this.mstats, jQuery));

Feb 8, 2012 at 4:50 PM


Based on my understanding, mstats.layout-Manager.js is defined this way, to check if the mstats namespace has been created, and if this is not the case created as an empty object instead. Which might not be necessary in other cases, like you mentioned.


Agustin Adami

Feb 9, 2012 at 3:51 AM