var a = [1,2,3];
1、常规方法
a instanceof Array // true
2、通过constructor
a.constructor == Array; //true
3、Jquery 使用的方法
toString.call(a); // 输出 "[object Array]"
4、es5.1
Array.isArray
var a = [1,2,3];
1、常规方法
a instanceof Array // true
2、通过constructor
a.constructor == Array; //true
3、Jquery 使用的方法
toString.call(a); // 输出 "[object Array]"
4、es5.1
Array.isArray
转载于:https://www.cnblogs.com/LightOfDarkness/p/4774443.html