javascript non vide non pas de chaîne

if (Array.isArray(array) && array.length) {
    // array exists and is not empty
}
crawlingcity