Immediately invoked function expression

An immediately invoked function expression (or IIFE, pronounced "iffy", IPA /ˈɪf.i/) is a programming language idiom which produces a lexical scope using function scoping. It was popular in JavaScript as a method to support modular programming before the introduction of more standardized solutions such as CommonJS and ES modules. 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.

Comment
enAn immediately invoked function expression (or IIFE, pronounced "iffy", IPA /ˈɪf.i/) is a programming language idiom which produces a lexical scope using function scoping. It was popular in JavaScript as a method to support modular programming before the introduction of more standardized solutions such as CommonJS and ES modules. 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.
Has abstract
enAn immediately invoked function expression (or IIFE, pronounced "iffy", IPA /ˈɪf.i/) is a programming language idiom which produces a lexical scope using function scoping. It was popular in JavaScript as a method to support modular programming before the introduction of more standardized solutions such as CommonJS and ES modules. 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.
Is primary topic of
Immediately invoked function expression
Label
enImmediately invoked function expression
Link from a Wikipage to an external page
developer.mozilla.org/en-US/docs/JavaScript/Reference/Functions_and_function_scope
Link from a Wikipage to another Wikipage
Automatic semicolon insertion
Call by reference
Category:JavaScript
Category:Programming language concepts
Closure (computer science)
Coding conventions
CommonJS
Defensive semicolon
ECMAScript
Evaluation strategy
For loop
Function scoping
Global variable
International Phonetic Alphabet
JavaScript
JavaScript syntax
Misnomer
Modular programming
Programming idiom
Scope (computer science)
SameAs
4ndtZ
Q6004782
立即调用函数表达式
즉시 실행 함수
Subject
Category:JavaScript
Category:Programming language concepts
WasDerivedFrom
Immediately invoked function expression?oldid=1111414564&ns=0
WikiPageLength
10225
Wikipage page ID
38413545
Wikipage revision ID
1111414564
WikiPageUsesTemplate
Template:Cite web
Template:Cn
Template:Nbsp
Template:Reflist
Template:Spnd