iife in javascript with example
Example: iife javascript
var result = (function () {
var name = "Barry";
return name;
})();
// Immediately creates the output:
result; // "Barry"
var result = (function () {
var name = "Barry";
return name;
})();
// Immediately creates the output:
result; // "Barry"