javascript check array length greater than 0 code example Example: javascript how to check if array is empty if(array.length > 0)