Dler Ari
1 min readJul 19, 2018

--

Thanks for the comment, and I fully understand your viewpoint. The code shown in the example only demonstrates the structure of the IIFE, and not so much about the benefits. There are of course many types of scenarios and ways of structuring IIFE. However, I chose to emphasize more on what IIFE may look like (by showing a common pattern) than how or where it can be used. And this allows the programmer to freely decide what works best.

--

--

Dler Ari
Dler Ari

Written by Dler Ari

Software Engineer sharing interesting tech topics

No responses yet