Continue to the scope of the problem, I saw this morning for a while, afternoon saw another type of question, function name and variable name the same problem. There will be no conflict between the name of the function and the name of the variable. And I haven't tested it. Lazy. Direct Sticker Code:
What do you guess the result after running? Breath: 100!! I really am a good tone, without thinking directly to give the answer, it is not very good habits.
Unexpected error, a little confused feeling. But one step at a way to analyze it, you can understand why this is the answer.
First, the problem needs to be linked to the pre-compilation phase of JS, that is, the context that needs to be prepared before executing the code, and the variables, functions, and other resources that need to be prepared during the precompilation phase.
Variables and variable expressions are declared at the pre-compilation stage, and are not assigned, and get undefined;
The declarative function gets the assignment at the pre-compilation stage, yes, it is directly assigned to the value.
and the order of preparation resources is sequential, pre-compiled function, parameters > variables;
Then this problem can be resolved as:
This time can be a good understanding of why a () This result is an error said a is not a function, people are already not function, has been redefined assignment value type, of course, to error.
JS---Name of function and variable name