数组 混淆的地方

判断是否为数组

1 var is_array = function(value) {
2         return value && typeof value === 'object' && typeof value.length === 'number' && typeof value.splice === 'function' && !(value.propertyIsEnumerable('length'));
3     };
4     
5 //使用方法
6 var arrayValue = [];
7 console.log(is_array(arrayValue));
原文地址:https://www.cnblogs.com/qzsonline/p/2592437.html