📌  相关文章
📜  检查数组是否为空 javascript 代码示例

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

代码示例6
if (!Array.isArray(array) || !array.length) {
  // array does not exist, is not an array, or is empty
  // ⇒ do not attempt to process array
}