Answer the question
In order to leave comments, you need to log in
Why parentheses around nested JS functions?
Let's say there is a function, it has two nested ones:
function test() {
(function first($)
{ ...
})
((function second(r) {
...
function in_second() {
}
return $;
})
}
Answer the question
In order to leave comments, you need to log in
I agree with Alexey Ten. You seem to have removed the extra parentheses.
Based on what's left and your question, I suspect you're interested in constructs like
(function(){
// some code here
})();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question