The first and last are effectively identical. The differences are a matter of style.
The second is unsafe as (depending on where it is) it could be a function declaration instead of a function expression, and you can't immediately invoke a function declaration.