how to check array has elements or not code example Example: javascript how to check if array is empty if(array.length > 0)