📅  最后修改于: 2022-03-11 15:03:09.747000             🧑  作者: Mango
let myArray = [];
if( myArray.length > 0 ) {
console.log(myArray);
console.log("Array has elements");
}
else {
console.log("Array has no elements");
}