2 and 3 are exactly equivalent. There is no functional difference between them.
1 is a syntax error. Because the function is not wrapped in brackets, it is treated as a function declaration. It is invalid because function declaration need to be named. The brackets make it a "function expression"; these do not need to be named.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…