JS判断数组是否为空

var arr = [];
if(arr == false){
	console.log("arr is empty!");
}else{
	console.log("arr is not empty!");
}

  

原文地址:https://www.cnblogs.com/sweeeper/p/11648647.html