It is said here:
http://briancrescimanno.com/2009/09/24/how-self-executing-anonymous-functions-work/
Take a look at the source code of jQuery and you’ll see that the
whole library is wrapped in a single, self-executing function that is
assigned to the jQuery global object.
But since jQuery is GLOBAL object it does pollute global namespace or I miss something ?
Having only one(two) variables in a global scope is not considered as pollution of the global scope. it’s like a namespace, it’s highly unlikely that other libraries will call their namespaces ‘jQuery’ (and more likely
$). and even in that situations jQuery handles it gracefully by implementingnoConflictfunction.