Code in this post can be obsolete, however, principles and theory may still apply.
var msg = "From inline function"; var result = (function(m) { alert(m); return "Result of inline function"; }(msg)); alert(result);
I'm a well seasoned developer, consultant and educator of web applications based mainly on Sencha libraries, PHP, MySQL and Node.js. Besides (Apple) computers, I love photography and mountain biking.
Follow me:
Latest posts by saki (see all)
- Ext, Angular, React, and Vue - 27. June 2019
- The Site Resurgence - 11. February 2018
- Configuring ViewModel Hierarchy - 19. June 2015
5 Responses
At first glance, the only advantage I see here is you can easily create a private function without polluting the global namespace. The main disadvantage is you can’t re-use the function.
Hi,
In your examples you have the line:
link rel=”shortcut icon” ref=”./img/extjs.ico”
Where i can find this file extjs.ico ?
Please, can you send to me ?
Beast regard´s,
Jose Sousa
Hi,
In your examples you have the line:
Where i can find this file extjs.ico ?
Please, can you send to me ?
Beast regard´s,
Jose Sousa
Sometimes you need to calculate result, e.g. while configuring a component, one of the options has to be “calculated”.
Performance is not a point here.
What are the advantages? Does in-lining will improve performance?