59

7分钟理解JS的节流、防抖及使用场景

 5 years ago
source link: https://juejin.im/post/5b8de829f265da43623c4261
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
前言 据说阿里有一道面试题就是谈谈函数节流和函数防抖。 糟了,这可触碰到我的知识盲区了,好像听也没听过这2个东西,痛定思痛,赶紧学习学习。here we go! 概念和例子 函数防抖(debounce) 在事件被触发n秒后再执行回调,如果在这n秒内又被触发

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK