Javascript Flashcards

1
Q

What’s IIFE (“Immediately Invoked Function Expression”)?

A

s a JavaScript design pattern which produces a lexical scope using JavaScript’s function scoping. Immediately-invoked function expressions can be used to avoid variable hoisting from within blocks, protect against polluting the global environment and simultaneously allow public access to methods while retaining privacy for variables defined within the function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly