Mejoras de sintaxis.
This commit is contained in:
@@ -18,7 +18,7 @@ function playRound(userChoice) {
|
|||||||
const computerChoice = computerPlay();
|
const computerChoice = computerPlay();
|
||||||
|
|
||||||
let resultMsg = `Tu elección: ${emoji(userChoice)} ${capitalize(userChoice)}<br>
|
let resultMsg = `Tu elección: ${emoji(userChoice)} ${capitalize(userChoice)}<br>
|
||||||
Computadora: ${emoji(computerChoice)} ${capitalize(computerChoice)}<br>`;
|
Máquina: ${emoji(computerChoice)} ${capitalize(computerChoice)}<br>`;
|
||||||
|
|
||||||
if (userChoice === computerChoice) {
|
if (userChoice === computerChoice) {
|
||||||
resultMsg += "<strong>¡Empate!</strong>";
|
resultMsg += "<strong>¡Empate!</strong>";
|
||||||
@@ -33,7 +33,7 @@ function playRound(userChoice) {
|
|||||||
} else {
|
} else {
|
||||||
computerScore++;
|
computerScore++;
|
||||||
computerScoreSpan.textContent = computerScore;
|
computerScoreSpan.textContent = computerScore;
|
||||||
resultMsg += "<strong>La computadora gana esta ronda.</strong>";
|
resultMsg += "<strong>La máquina gana esta ronda.</strong>";
|
||||||
}
|
}
|
||||||
|
|
||||||
resultDiv.innerHTML = resultMsg;
|
resultDiv.innerHTML = resultMsg;
|
||||||
|
Reference in New Issue
Block a user