SOURCE

window.onload = () => {
    var arr = [];
    var obj = {};

    console.log('Array: ' + (arr instanceof Array));
    console.log('Array: ' + (arr instanceof Object));
    console.log('Object: ' + (obj instanceof Array));
    console.log('Object: ' + (obj instanceof Object));


    var arrayResult = Object.prototype.toString.call([]);
    var objectResult = Object.prototype.toString.call({});
    console.log('arrayResult: ' + arrayResult);
    console.log('arrayResult: ' + objectResult);

    console.log('arrayLength: ' + (arr.length));
    console.log('objectLength: ' + (obj.length));
}
console 命令行工具 X clear

                    
>
console