📌  相关文章
📜  数组也是一个对象 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:36.929000             🧑  作者: Mango

代码示例1
// Prove that Array is also an Object in JavaScript
// Method -1
let arr = [];
console.log(typeof arr);

// Method -2
let arr2 = [];
if (Array.isArray(arr2)) {
   console.log(`Array is an Object in JavaScript`);
}