Skip to content
2012 edited this page Jul 20, 2020 · 2 revisions

模拟与浏览器等同功能的定时器(setTimeout/setInterval)

预习概念

node vs browser

  1. setTimeout 函数里的 this 意义不同,浏览器指代全局变量 window,node 指代 Timeout 对象
  2. timer 参数不接受字符串,若为字符串,则抛错;

Timeout(由 setTimeout 和 setInterval 返回)

  • hasRef
  • ref
  • refresh
  • unref

Immediate(node.js 独有,由 SetImmediate 返回)

  • hasRef
  • ref
  • unref

对于 clearImmediate / clearTimeout / clearInterval 是可以混用的,都达到取消的功能

JS

  1. 作用域
  2. 闭包
  3. 原型(链)
  4. 模块
  5. 位操作符
  6. 事件循环
  7. eval

CSS

  1. float
  2. BFC
  3. position
  4. flex
  5. grid

DOM

  1. DOM
  2. how browser works

Node.js

  1. Stream
  2. Timers
  3. Child Processes
  4. HTTP
  5. File System

react

  1. 生命周期
  2. setState
  3. hook

git

  1. git 基础命令
  2. git rebase 理解
  3. git bisect
  4. git commit
  5. git hook

设计模式

  1. 策略模式
  2. ...

TCP/IP 协议

  1. HTTP/1.x
  2. HTTP/2
  3. SSL/TLS
  4. TCP
  5. DNS
  6. HTTP Cache
  7. CORS
  8. http status code

linux(shell)知识点

  1. bashrc vs profile
  2. vim
  3. shell基本语法
  4. shell 知识误区
  5. shell命令
  6. 鸟哥的Linux私房菜:基础学习篇
  7. sudo vs su

Clone this wiki locally