Data Types

JS has typed values, not typed variables. typeof a is not asking for the "type of a", but rather for the "type of the value currently in a".

Primitives Types

  • Number
    • Special numbers: Infinity, -Infinity, NaN
  • String
  • Boolean
    • true, false (0, NaN, "")
    • NaN == NaN //false or NaN !== NaN //true
    • (void 0) === undefined //true
  • Undefined
  • Symbol

Structural Types

  • Object
  • Function

Structural Type Root

  • null

Negative Infinity (-Infinity)

Negative number divided by 0

Data Structures

  • set
  • map
  • weakset
  • weakmap