This is to wrap you whole code in an anonymous function. This way variable declared inside the function will remain private, so other scripts won't be able to access your code.
And .call is a function method. That will invoke the anonymouse function with passed argument as a value of this.
In this case whatever is the value of this is by default it's window object, will be available inside the anonymouse function to. Here is an example of it.
(function(a, b, c ){ // and other arguments
// Here `this` will refer to document object.
// And the variables declared here are compltly private
// If you want any variable to make global use window object
var someStuff = 'scret'; // Private
function Lib(){
return someStuff.length;
}
window.Lib = Lib; // This will be available to other scripts
}).call(document, a, b, c);
This kind of wrapper is generally generated by preprocessor languages like CoffeeScript
thisinside the function to the same asthisoutside the function. (This usually is ran globally, sothisiswindow.)thisis the same in both cases.