typeof 可以判断:undefined,数值,字符串,布尔值,function 不能判断null,object,array instanceof可以判断:对象 转载于:https://www.cnblogs.com/tremendous/p/10802175.html