iife function in js 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"