Those are the self-executing part. The first set of brackets contain the expressions to be executed, and the second set of brackets executes those expressions.
And why are those () extras?
you need to use them because when the Javascript Parser run and see the function keyword
, so he will assume you are starting a a function statement and you will get some nasty syntax error,
also you need to know that function expressions and function statements are two differents things but unfortunately the syntax is almost equal, so thats why we are using those () extras, like @zerkms says its kinda a "hack"