let timer = null
function interval(func,wait){
let interv = function(){
func.call(null)
timer = setTimeout(interv,wait)
}
timer = setTimeout(interv,wait)
}
interval(function(){console.log(‘yyyy‘)},1000)
2024-01-18 13:55:34
let timer = null
function interval(func,wait){
let interv = function(){
func.call(null)
timer = setTimeout(interv,wait)
}
timer = setTimeout(interv,wait)
}
interval(function(){console.log(‘yyyy‘)},1000)