Rationale for KM JavaScript-in-browser style: enclose in (function () { ... } )();

See the step by step account of the various parts of an IIFE in this post:

3 Likes