What is "Function" in parentheses for in Javascript?

Asked

Viewed 35 times

1

I’ve noticed that there are codes more or less like this:

<script>
    (function (parametros){})
</script>

Other similar code:

(function (val) {
    return val;
})(123);

What use is that?

  • Related: http://answall.com/q/23785/129

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.