js的数据类型有:
原始数据类型:string number undefined null boolean
引用数据类型:Object ***
检测这些数据类型的方法:
typeof检测,可以返回:string number undefined boolean object function
typeof检测null 返回object
typeof检测[ ] 返回object
typeof检测number 返回object
它们都返回object,如何区分:
Object.prototype.toString.call(需要检测的数据);
返回:[Object 数据的类型]