The Immediately Invoked Function Expression

The Immediately Invoked Function Expression (IIFE, pronounced iffy) is a named/anonymous function expression that is executed immediately after its declaration. It typically involves appending the function invocation operator '()' to the end of a function expression; this triggers its immediate invocation. Some background The IIFE used to be wrongly regarded as a Self Invoked Anonymous Function (SIAF) until Ben … Continue reading The Immediately Invoked Function Expression

Defining JavaScript Functions

There are many ways to create functions in JavaScript; some styles are quite popular e.g. the function declaration and function expression while others are not. All approaches create a Function object however there are a couple of differences under the hood. Lets take a peek... 1. Function Declaration The function declaration pattern is one of the most … Continue reading Defining JavaScript Functions