I just found this function, which confuses me. Here is the example:
Looks like a little bit complex. But i will change to another classic example:
This function means, immediately-Invoked Function Expression(自执行匿名函数) or IIFE. It executes immediately after it created.
In the first parenthesis (), it means an anonymous function(匿名函数)， the second parenthesis, it calls this anonymous function and parses param(调用并传入参数).
For example, in the second parenthesis (), 2 and 3 are param. After created this function, it would execute immediately.
Meanwhile, one thing needs to be mentioned,
this one is not immediately invoked function expression, but an shorter method for document ready event.