0
One of these days I saw a code on javascript and I wondered why use parentheses to close a Function:
(function(){
});
Like this code above. I appreciate any explanation.
0
One of these days I saw a code on javascript and I wondered why use parentheses to close a Function:
(function(){
});
Like this code above. I appreciate any explanation.
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
The name of it is
IIFE (Immediately Invoked Function Expression)
. This indicates that once Javascript creates the function, it will run.(function(){
/* Code */
})();
– Valdeir Psr
Hmm interesting, thanks for the help.
– Richard Santos
See if the links in the yellow box up there clarify you. If not, let us know here.
– bfavaretto