2018年9月25日

变量提升、函数提升,以及它们的优先级

摘要: 全部解析,详见github:https://github.com/cag2050/var_function_hoisting 变量提升 console.log(a) var a / 以上代码等价于 ` var a console.log(a) ` / // 只有函数声明才有变量提升。 console 阅读全文

posted @ 2018-09-25 21:50 cag2050 阅读(459) 评论(0) 推荐(0) 编辑

函数防抖(Debounce)、函数节流 (Throttle)

摘要: 一篇介绍文章:https://zhuanlan.zhihu.com/p/38313717 演示示例:http://demo.nimius.net/debounce_throttle/ 函数防抖(Debounce) 比较好的解释:https://www.jianshu.com/p/3e8e31f996 阅读全文

posted @ 2018-09-25 01:12 cag2050 阅读(913) 评论(0) 推荐(0) 编辑

导航