javascript programming idiom



HI all:

I often see people write code like as below to invoke code block:

(
function() { do some thing here}
) ()

my question is why do like this, and what is benefit.

regards
.