Returns true if object is an Array.

返回true。如果对象是一个数组.

1 (function(){ return _.isArray(arguments); })();
2 => false
3 _.isArray([1,2,3]);
4 => true

源码:

1   _.isArray = nativeIsArray || function(obj) {
2     return toString.call(obj) == '[object Array]';
3   };

 

 

 

posted on 2012-04-16 23:01  himanhimao  阅读(237)  评论(0编辑  收藏  举报