So, I wrote a program. But I get an token error 'else'. I think I wrote everything correctly.
I tried to write just an else, but it is the same here.
if (averageDolphinsScore > averageKoalasScore && averageDolphinsScore >= 100) {
console.log(`Dolphins wins with ${averageDolphinsScore} points.`);
} else if (averageDolphinsScore < averageKoalasScore && averageKoalasScore >= 100); {
console.log(`Koalas wins with ${averageKoalasScore} points.`);
} else if (averageDolphinsScore === averageKoalasScore && averageKoalasScore >= 100) {
console.log(`It's a tie.`);
}
Aucun commentaire:
Enregistrer un commentaire