What does this mean?

Feb 7, 2012 at 11:35 PM

Hi,

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));

Developer
Feb 8, 2012 at 3:50 PM

Hi,

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.

Regards,

Agustin Adami
http://blogs.southworks.net/aadami


Feb 9, 2012 at 2:51 AM

Thanks.