Skip to content

Commit adc8a90

Browse files
Merge pull request #897 from RishikaReddy123/patch-1
Update script.js
2 parents e0a569e + 67e6761 commit adc8a90

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

DiceGame/script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ var img2 = document.querySelector(".img2").setAttribute("src",randomDiceImage2);
1010

1111
var winnerDeclaration = document.querySelector("h1");
1212
if(randomNo>randomNo2){
13-
winnerDeclaration.innerHTML="🚩Player 1 is the winner!"
13+
winnerDeclaration.textContent="🚩Player 1 is the winner!"
1414
}
1515
else if(randomNo<randomNo2){
16-
winnerDeclaration.innerText="Player 2 is the winner🚩!"
16+
winnerDeclaration.textContent="Player 2 is the winner🚩!"
1717
}
1818
else{
19-
winnerDeclaration.innerText="Try again!"
19+
winnerDeclaration.textContent="Try again!"
2020
}

0 commit comments

Comments
 (0)