Sonny
Sonny

Reputation: 5

Function followed by more parameters?

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

Answers (1)

Mário Garcia
Mário Garcia

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

Related Questions