var let const
let 不能声明多次
1 | var i = "global"; |
1 | var i = "global"; |
1 | function test () { |
1 | let i = "global"; |
1 | let i = "global"; |
1 | function test () { |
Object.freeze()
undefined null
===
!==
Array
push pop
shift unshift
Math.random()
Math.floor()
parseInt()
字符串 -> 数值
Arrow Function
匿名函数
Rest Operator
参数封装为数组
Spread Operator
深拷贝
use strict
import requires
import * as … from …
export default
默认导出,引用时无需使用 {}