Number,String, Null, Undefined, Symbol, Boolean
用 typeof 可以检测出变量的基本数据类型, 但是有个特例, 就是 null 的 typeof 返回的是 object, 这个是 javascript 的历史 Bug
ES6 新增数据类型 Symbol: 表示独一无二的值
- typeof Symbol() // symbol
- typeof Number() // number
- typeof Sring() // string
- typeof Function() // function
- typeof Objecr() // object
- typeof Boolean() // boolean
- typeof null() // object
- typeof undefined() // undefined
来源: http://www.bubuko.com/infodetail-2543931.html