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