const arr = [1, 2, 3];
const obj = {name: "山田太郎"};

console.log(Array.isArray(arr));    // true(配列)
console.log(Array.isArray(obj));    // false(配列ではない)
Array.isArray(value);
// 全てtrueを返す
Array.isArray([]);
Array.isArray([1]);
Array.isArray(new Array());
Array.isArray(new Array("a", "b", "c", "d"));
Array.isArray(new Array(3));

// 全てfalseを返す
Array.isArray();
Array.isArray({});
Array.isArray(null);
Array.isArray(undefined);
Array.isArray(17);
Array.isArray("Array");
Array.isArray(true);
Array.isArray(false);
console.log(typeof [1, 2, 4]);    // 出力: "object"
function checkArray(arr) {
    if (Array.isArray(arr)) {
        console.log("It is an array.");
    } else {
        console.log("It is not an array.");
    }
}

const argumentsObj = (function() {return arguments;}());
checkArray(argumentsObj); // 出力: "It is not an array."