如何判断一个数组是否为空 javascript

2025-02-25 23:11:58
推荐回答(1个)
回答1:

a = [];
if(a.length>0){
alert(true);
} else {
alert(false);
}