前端题目if()内部的变量提升
var y = 1
if(function f(){}){
console.log(typeof f) // undefined
y = y + typeof f
}
console.log(y) // 1undefined
真的不咋明白为什么会输出这个结果,有佬知道嘛~
if(function f(){}){
console.log(typeof f) // undefined
y = y + typeof f
}
console.log(y) // 1undefined
真的不咋明白为什么会输出这个结果,有佬知道嘛~
全部评论
插眼
相关推荐
点赞 评论 收藏
分享
点赞 评论 收藏
分享