javascript how to check if array is empty

JavaScript
if(array.length > 0)
Source

Also in JavaScript: