📜  取消 settimeout - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:16.240000             🧑  作者: Mango

代码示例3
// wait 1000ms and then run func()
let myTimeout = setTimeout(func, 1000);
// cancel the timeout
clearTimeout(myTimeout);