setTimeout III
2022年5月1日小于 1 分钟
setTimeout III
Question
What does the code snippet to the right output by console.log
?
Snippet
let func = () => {
console.log(1)
}
setTimeout(() => {
func = () => {
console.log(2)
}
}, 0)
setTimeout(func, 100)