function aass() {
let fun = 1;
return function() {
if (fun) {
clearTimeout(fun);
}
fun = setTimeout(() => {
console.log("测试");
}, 1000);
}();
}
setInterval(() => {
aass()
}, 900);| 欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |