JS基本有5种简单数据类型:Number,String,Bolean,Null,Underfined.引用数据类型:function,Object,Array 判断数据类型的方法 常用的数据类型判断方法有三种 typeof,instanceof,Object.prototype.toString.call() 下面介绍一下这几种方法。 typeof console.log(typeof 2); //number console.log(...
JS基本有5种简单数据类型:Number,String,Bolean,Null,Underfined.引用数据类型:function,Object,Array 判断数据类型的方法 常用的数据类型判断方法有三种 typeof,instanceof,Object.prototype.toString.call() 下面介绍一下这几种方法。 typeof console.log(typeof 2); //number console.log(...