RobinZhao00

Results 4 comments of RobinZhao00

`const debounce = (fn, wait = 100) => { let timer = null; return function(...args){ if(timer !== null) clearTimeout(timer); timer = setTimeout(() => fn(...args), delay); } }` `const throttle =...

```javascript // nb ```

[写了点 demo](https://codepen.io/DrivingFatigue/pen/abBEGWG) 不同的写法而已,别太在乎