1、js有6中不同的数据类型
1、string 2、number 3、boolean 4、object 5、function 6、symbol
2、种对象类型
1、object 2、Date 3、Array
3、2个不包含任何值的数据类型
1、null 2、undefined
4、注意
1、typeof function () {} // 返回 function
2、typeof [1,2,3,4] // 返回 object
3、typeof {name:'John', age:34} // 返回 object
4、typeof new Date() // 返回 object
5、typeof myCar // 返回 undefined (如果 myCar 没有声明)
6、typeof null // 返回 object
7、typeof NaN // 返回 number