基本数据类型:Undefined、Null、Boolean、Number、String、Object
值类型:Number、Boolean、Null、Undefined。
引用类型:Object、Array、Function。
判断数据类型
function typeOf(obj){
return Object.prototype.toString.call(obj).split(' ')[1].split(']')[0]
} // 会返回对应的数据类型 Undefined、Null、Boolean、Number、String、Object、Function