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

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -