1. 判断数组是否为空
if (array === undefined || array.length == 0) {
    // array empty or does not exist
}