Reputation: 5
How does this syntax function - function()()
I keep seeing functions followed by brackets with other parameters?
Any explanation or link would be appreciated.
Upvotes: 0
Views: 38
Reputation: 575
Maybe you're refeering to IIFE (Immediately Invoked Function Expression)
The second pair of parenthesis is invoking the function immediately after it was declared.
Upvotes: 3