mardi 4 février 2020

Comparing items in an array to get a winner, function not working [closed]

   

 let decision = [];
    let whoWins = () =>{
        if(decision.includes("A") && decision.includes("B")){
             console.log("B wins")

        }
        else if(decision.includes("A") && decision.includes("C")){
           console.log("C Wins!!")

      }
      else if(decision.includes("B") && decision.includes("Z")){
           console.log("Z Wins!!")

      }
       

    }
Comparing items in an array to get a winner, function not working Why is this code not working

Aucun commentaire:

Enregistrer un commentaire