what means this javascript code function -
this question has answer here:
(function () { // somethig })();
what means function in parentheses? ()();
developers creates functions in js files directly.
what means function in parentheses?
()();
that means self-invoking function in javascript.
notice the: ();
- calling.
your function, anonymous btw, invoked automatically without caller intervention, itself, once it's declared.
in addition, @thilo suggested, isolated scope local variables.
Comments
Post a Comment