how to check an empty array js

JavaScript
Array.isArray(emptyArray) && emptyArray.length
Source

Also in JavaScript: