Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

immediately invoked function expression

(function () {
    var aName = "Barry";
})();
// Variable aName is not accessible from the outside scope
aName // throws "Uncaught ReferenceError: aName is not defined"
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #immediately #invoked #function #expression
ADD COMMENT
Topic
Name
5+3 =