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
Post a Comment