微信小程序判断数组是否为空 var array = [] if (array.length == 0) { console.log( ‘数组为空’ ) } else { console.log(‘数组不为空’) }