This way you can use an alias in a safe area.
(function ($) { $.DoSomething(); })(someGlobal);
Update:
The most important thing related to this has identified a safe area for using someGlobal .
If you use the second method, someGlobal is still global, just the image you use someGlobal in the callback function, and you rewrite someGlobal somewhere outside, what will happen?
source share