iife learn javascript code 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"