Tag Archives: IIFE

How to create an immediately-invoked function expression – IIFE in Javascript – Learn from Tutorial

How to create an immediately-invoked function expression – IIFE in Javascript An Immediately-invoked Function Expression is a way to execute a function immediately, as soon as it is created. IIFE is an example of function invocation: the first pair of parenthesis (function(name) {…}) is an expression that evaluates to a function object, followed by the…

Read More

IIFE – Immediately Invoked Function Expression – JavaScript – JavaScript Dev Feed

IIFE – Immediately Invoked Function Expression – JavaScript Topics covered: Introduction Why do we use IIFE Alternative in ES6+ Introduction It is a function expression that runs as soon as we define it. (function(){ console.log(“My favorite hero is Captain America”) })() Enter fullscreen mode Exit fullscreen mode The first parathesis make it an expression and…

Read More