jquery 判断数组是否为空

jquery 判断数组是否为空

if (data.length === 0) {
  console.log("数组为空");
}