Need help with this please..I keep getting a error with the else statement, what can be the cause? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Need help with this please..I keep getting a error with the else statement, what can be the cause?

https://code.sololearn.com/WOCDAi1dK52l/?ref=app

10th Jun 2019, 7:48 PM
DryMango Cam
DryMango Cam - avatar
3 Answers
+ 3
if (playerOne < playerTwo); { document.write("player two Win!") }     return document.write("double K.O!")
13th Jun 2019, 6:29 PM
Adriano_Oliveira
Adriano_Oliveira - avatar
+ 2
var playerOne = prompt("Enter player one score"); var playerTwo = prompt("Enter player two score"); if (playerOne > playerTwo) {     document.write("Player one Win!")     } if (playerOne < playerTwo) { document.write("player two Win!") } if (playerOne == playerTwo) {     document.write("double K.O!") }
13th Jun 2019, 8:44 PM
Mario Gonzalez Aranda
Mario Gonzalez Aranda - avatar
0
Thx m8!
10th Jun 2019, 9:17 PM
DryMango Cam
DryMango Cam - avatar