摘要:
函数节流(throttling)与函数防抖(debouncing)的语义 Throttling will delay executing a function. It will reduce the notifications of an event that fires multiple time 阅读全文
摘要:
Web Storage的目的是克服由cookie带来的一些限制,当数据需要被严格控制在客户端上时,无须持续地将数据发回给服务器。 Web Storage的两个主要目标是: 提供一种在cookie之外存储会话数据的途径 提供一种存储大量可以跨会话存在的数据的机制 1.Storage类型 Storage 阅读全文
摘要:
1.闭包(Closure):指有权访问另一个函数作用域中的变量的函数。 function f1() { var n = 999; function f2() { console.log(n); } return f2; } var result = f1(); result(); //999 上面的 阅读全文