(function() {
this.Lib = {};
}).call(this);
Defines the property of the Libobject it called on, and immediately calls thiswhich it usually is window. It can instead refer to the object that owns the method in which it is called.
(function() {
var Lib = {}; window.Lib = Lib;
})();
Defines a property Lib windowregardless of where it called (although it also called right away).
(function(global) {
var Lib = {}; global.Lib = Lib;
})(global);
Lib , . , , global . window .
" ", . ( ) . .
, , , , // ( , Lib).
undefined, ( new), , , , .