Blog.

Inline Anonymous Funcion Pattern

[su_icon_text icon=”icon: info-circle” icon_color=”#5b63df” class=”saki-info-box”]Code in this post can be obsolete, however, principles and theory may still apply.[/su_icon_text]
var msg = "From inline function";
var result = (function(m) {
    alert(m);
    return "Result of inline function";
}(msg));
alert(result);
saki
Follow me:
Latest posts by saki (see all)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your username and password to log into your account. Don't have an account? Sign up.

Want to collaborate on an upcoming project?