JavaScript IIFE (Immediately Invokable Function Expressions in JavaScript) Design Pattern

Mayank Gupta. CodeProject. 2017-06-15.
This post gives a small introduction about Singleton Pattern in JavaScript.
The post offer you more topics on Object Oriented JavaScript Design.
IIFE (Immediately Invokable Function Expression) is a important concept in JavaScript. it is a commonly used Design Pattern which is used to wrap set of variables and functions which cannot be accessed outside the enclosed scope.
These are Anonymous Function that is wrapped inside a set of paranthesis and is called immediately.
The common advantage of IIFE is that any “Function or Variable” defined inside IIFE, cannot be accessed outside the IIFE block, thus preventing global scope from getting polluted. Also helps us manage memory in an efficient manner.
In order to understand the concept of IIFE, we need to understand the difference between the following:
Function Definition
Function Expression

[JavaScript IIFE (Immediately Invokable Function Expressions in JavaScript) Design Pattern]


Write dramatically less code with Ember’s Handlebars integrated templates that update automatically when the underlying data changes.
Don’t waste time making trivial choices. Ember.js incorporates common idioms so you can focus on what makes your app special, not reinventing the wheel.
Ember.js is built for productivity. Designed with developer ergonomics in mind, its friendly APIs help you get your job done—fast.



Vue (pronounced /vjuː/, like view) is a progressive framework for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is very easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with modern tooling and supporting libraries.



Welcome! Ionic is a powerful HTML5 SDK that helps you build native-feeling mobile apps using web technologies like HTML, CSS, and Javascript.
Ionic is focused mainly on the look and feel, and UI interaction of your app. That means we aren’t a replacement for PhoneGap or your favorite Javascript framework. Instead, Ionic simply fits in well with these projects in order to simplify one big part of your app: the front end. We recommend reading Where does the Ionic Framework fit in? to get a good understanding of Ionic’s goals.
Ionic currently requires AngularJS in order to work at its full potential. While you can still use the CSS portion of the framework, you’ll miss out on powerful UI interactions, gestures, animations, and other things.
We will be releasing Cordova/PhoneGap plugins in the future to expand the capabilities of your apps.