代码不复杂,但是想不通为什么
var t = performance.now()
(function a() { console.log(1)
setTimeout(a,100)
})()如果去掉第一行var t = ...,代码执行就是正确的,现在保留第一行,代码会报TypeError: performance.now(...) is not a function的错,请问performance.now()和setTimeout之间有什么冲突吗?先谢谢各位了~
喵喵时光机
相关分类