We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can define an anonymous function and execute immediately by
(function(){ var foo = 10; var bar = 2; console.log(foo * bar); // 20 })();
You also can define an anonymous function with arguments and execute immediately by
(function(foo, bar) { console.log(foo * bar); // 20 })(10,2);
You can define an anonymous function that returns a value by
var baz = (function(foo, bar) { return foo*bar; })(10,2); console.log(baz); // 20
There was an error while loading. Please reload this page.