- 实现ajax
1 | // 封装一 |
- 手写new过程
1 | function myNew(fn, ...arg) { |
- instanceof关键字
1 | function MyInstanceof(child, father) { |
- 防抖的实现
1 | function myDebounce(fn, delay = 500) { |
- 节流的实现
1 | function throttle(fn, delay = 500) { |
- 数组的去重
1 | function quchong1(arr) { |
- settimeOut实现setInterface
1 | function mySetInterval(fn, delay) { |
- setInterval实现setTimeout
1 | function mySetTimeout(fn, delay) { |