Basic Knowledge

  • 数据类型
    • number
      • isInteger
    • string
      • .length
    • boolean
    • object
      • Object.freeze()
      • get
      • set
      • construct
    • array
      • filter(item, index, array)
      • map
      • spread operator: … return comma seperated array
    • symbol
    • undefined
    • null
  • 未声明的变量使用时自动在全局定义
  • ===, !==
  • let : 不能多次声明
    • When you declare a variable with the let keyword inside a block, statement, or expression, its scope is limited to that block, statement, or expression
  • “use strict”; : 必须声明
  • const : read-only
    • objects (including arrays and functions) assigned to a variable using const are still mutable
  • Anonymous Functions: arrow function syntax
    • function() {}
    • () => {}
    • () => “value”
  • require
  • import