js if list 0 code example
Example: javascript not empty array not string
if (Array.isArray(array) && array.length) {
// array exists and is not empty
}
if (Array.isArray(array) && array.length) {
// array exists and is not empty
}