Immediately invoked function expression


Topic | v1 | created by jjones |
Description

An immediately invoked function expression (or IIFE, pronounced "iffy") is a JavaScript programming language idiom 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.


Relations

subtopic of C++

C++ (C plus plus) is a general-purpose programming language created by Bjarne Stroustrup as an extens...


Edit details Edit relations Attach new author Attach new topic Attach new resource
Resources

treated in Technique: Immediately-Invoked Function Expression for Metaprogramming

Common C++ guidelines are to initialize variables on use and to make variables const whenever possibl...