function isArray(value) {
    if (typeof Array.isArray === "function") {
        return Array.isArray(value);
    } else {
        return Object.prototype.toString.call(value) === "[object Array]";
    }
}

 

 posted on 2016-05-25 16:21  干锅饭  阅读(305)  评论(0编辑  收藏  举报