what is self executing function in javascript code example
Example: call a self executing function javascript
var foo = (function bar() {
alert('hello');
return bar;
})(); // hello
foo(); // hello
var foo = (function bar() {
alert('hello');
return bar;
})(); // hello
foo(); // hello