Immediately Invoked Function Expressions – “IFFY”

This is a IFFY Douglas Crockford style:

(function () { 
//code goes here
}());  

More common seen in the wild:

(function () { 
//code goes here
})();

Note:
If you are using this to keep variables in a scope you might consider if you want to use ‘let’ and ‘const’ instead if you are writing es6 code!
Read more about that in our aticle about var, let and const variable declarations in es6

Add your comment