JS数据类型检测typeof、instanceof、constructor、Object.prototype.toString.call()的区别
数据类型检测的四种方式typeof不能细分对象类型的值,都是返回“object”,函数检测返回“function”。typeof10:numbertypeofnewNumber(10):objecttypeoftrue:booleantypeofnewBoolean(true):objecttypeof“aaa”:stringtypeofnewString(“aaa”):objecttypeofn