"function count(start, end) {
console.log(start) var timer = setInterval( ()=>{ console.log(++start) while(start>=end){ clearInterval(timer) break
}
},100) return { cancel(){
clearInterval(timer) } } }