is confused about why the function expression IIFE,function () {} (); reported an error immediately.
ask whether the error is reported at the precompilation stage or during the execution of ().
js interprets the function declaration in the "precompilation" phase, but ignores the expression
1. One is to report an error in the precompilation stage, because the precompilation will declare a function, with a missing name and throw a syntax error message, because the function declaration requires a name.
2. Error is reported only when (); is executed. Since function () {/ / code} has been explained in the "precompilation" phase, js will skip function () {/ / code} and try to execute ();, so it will report an error