My JavaScript recipes
The code block checks to see if the array is an array and if it is, it checks to see if the length of the array is zero.
Shortcut: array.is_empty
const isEmpty = Array.isArray(array) && array.length == 0;