We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
这两个概念一直都理不清楚,看过不少关于区分概念的文章,如JavaScript 函数节流和函数去抖应用场景辨析这篇文章,还是稀里糊涂滴:joy:,直到看到一句简单的英文句子才理解:
我理解的意思是:
可以参考特效
The text was updated successfully, but these errors were encountered:
function throttle(fn, interval) { var timer, first = true; return function() { if (first) { fn.apply(this, arguments); return first = false; } if (timer) {return false;} timer = setTimeout(() => { clearTimeout(timer); timer = null; fn.apply(this, arguments); }, interval); } }
Sorry, something went wrong.
function debounce(fn, wait){ var timeid; return () => { clearTimeout(timeid); timeid = setTimeout(() => { timeid = null; fn.applay(this, argument); }, wait) } }
No branches or pull requests
这两个概念一直都理不清楚,看过不少关于区分概念的文章,如JavaScript 函数节流和函数去抖应用场景辨析这篇文章,还是稀里糊涂滴:joy:,直到看到一句简单的英文句子才理解:
我理解的意思是:
可以参考特效
The text was updated successfully, but these errors were encountered: