JS实现sleep方法
function sleep (time, ob) {
setTimeout(()=>{
ob()
},time)
}
var doThing = function(){
alert(123)
}
点赞
function sleep (time, ob) {
setTimeout(()=>{
ob()
},time)
}
var doThing = function(){
alert(123)
}
评论