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