应用场景:
想要测试程序中定时器每一秒的操作时
想要测试定时器完结的同时解决时

const start = (e) =>{    let timer = null    timer = setInterval(() =>{        e--        e < 0 ? clearInterval(timer) :console.log(e)    },1000)}start(5)

成果: