用setTimeout实现setInterval

timerFun();

function timerFun() {
    console.log("实现操作部分")
    let timer = setTimeout(function () {
    timerFun();
    clearTimeout(timer)
    }, 10000);
}
posted @ 2020-02-24 15:45  shellon  阅读(523)  评论(0编辑  收藏  举报