Hoisting III
2022年5月1日小于 1 分钟
Hoisting III
Question
What does the code snippet to the right output by console.log
?
Snippet
var a = 1
function func() {
a = 2
console.log(a)
var a
}
func()
console.log(a)
if (!('b' in window)) {
var b = 1
}
console.log(b)