javascript - Can't get some JS syntax -


this question has answer here:

file.js:

(function(m) {     //some     //code     //here }(m)) 

i can't construction mean?

that code defines function inline , executes it.

think substituting function variable:

(function(m) {     //some     //code     //here }(m)) 

then that's same as:

var f = function(m) {     //some     //code     //here } (f(x)) 

but without having define f.


Comments

Popular posts from this blog

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -