var func2 = function func1() {
console.log(1010)
// console.log('func1', func1)
}
function func3 () {
console.log(1010)
}
func3() // 1010
func2() // 1010
func1() // func1 is not defined
func1 cannot be accessed, please explain, please explain
学习ing2017-06-12 09:32:01
The function you create is created through function expression, not through function declaration statement, function name can only be used in this function expression. Notefunction declaration statements and Function expressionsThe way to define functions is different.
Refer to the Javascript Definitive Guide 8.1 Function Definition section: