check if array is not null or not empty javascript code example Example: check if array is empty javascript array.length = []