checking if an array is empty javascripti 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
}