samedi 25 août 2018

Break, not working within forloop after conditional statement, nodeJS

    for(x in currentArr){
    if(names.includes(currentArr[x]) == false){
        console.log("success")
        break
    }
}

Does not break the loop, and prints "success", for every x in currentArr

Aucun commentaire:

Enregistrer un commentaire