数据类型检测

// 类型检测
typeof str           //检测string boolean number undefind
toString.call(obj)   //检测 null function object array...等对象
a instanceof Object  //a是否是由 Object构造
原文地址:https://www.cnblogs.com/wenwenwei/p/10017872.html