Location of parenthesis for auto-executing anonymous JavaScript functions?
They’re virtually the same. The first wraps parentheses around a function to make it a valid expression and invokes it. The result of the expression is undefined. The second executes the function and the parentheses around the automatic invocation make it a valid expression. It also evaluates to undefined. I don’t think there’s a “right” … Read more