I don't know why I keep getting the console.log from if statement even both averages are above 100. Where did I put my mistake?
const dolphinsScores = 97 + 112 + 101;
const dolphinsAverage = dolphinsScores / 3;
const koalasScores = 109 + 95 + 123;
const koalasAverage = koalasScores / 3;
console.log(dolphinsAverage);
console.log(koalasAverage);
if (dolphinsAverage || koalasAverage < 100) {
console.log('One of the team is already lost')
} else if (dolphinsAverage > koalasAverage) {
console.log('Team Dolphins are the winner of the competition! đŹđ');
} else if (koalasAverage > dolphinsAverage) {
console.log('Team Koalas are the winner of the competition! đšđ');
}
Aucun commentaire:
Enregistrer un commentaire