call a self executing function 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