小小的面试题
let a = 10
if(function b(){}){
a += typeof(b)
}
console.log(a)==>10undefined
function b(){}这个函数肯定是真,就会继续执行,但是又在()里包着成表达式了,因此函数b也就不存在了。
let a = 10
if(function b(){}){
a += typeof(b)
}
console.log(a)==>10undefined
function b(){}这个函数肯定是真,就会继续执行,但是又在()里包着成表达式了,因此函数b也就不存在了。