How to check if an array is empty or exists using JavaScript?

How to check if an array is empty or exists using JavaScript?