查看对象是否为数组 (包含字符串 "Array"):

function isArray(myArray) {
    return myArray.constructor.toString().indexOf("Array") > -1;
}

原文地址:https://www.cnblogs.com/liuting-1204/p/15126679.html