how check if array length is 0 code example Example 1: javascript how to check if array is empty if(array.length > 0) Example 2: check if array is empty javascript array.length = []