js ifee code example
Example 1: Immediately-Invoked Function javascript
(() => {
/* */
})()
Example 2: iife
(function () {
var aName = "Barry";
})();
// Variable aName is not accessible from the outside scope
aName // throws "Uncaught ReferenceError: aName is not defined"