Inline Anonymous Funcion Pattern

Share This Post

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);
Follow me:
Latest posts by saki (see all)

Want to collaborate on an upcoming project?