Skip to content

Commit

Permalink
edit endQuiz funtion to hide the last question
Browse files Browse the repository at this point in the history
  • Loading branch information
deponte-designer committed Dec 5, 2023
1 parent d7187dd commit d804b9b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion assets/js/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ function checkAnswer(choice) {
// Function to end the quiz
function endQuiz() {
choicesElement.innerHTML = '';
const questionElement = document.getElementById('questions');
questionElement.classList.add('hide');
endScreenElement.classList.remove('hide');
finalScoreElement.textContent = time;
};
Expand Down Expand Up @@ -142,4 +144,5 @@ submitButton.addEventListener("click", function () {
}

window.location.href = 'highscores.html';
});
});

0 comments on commit d804b9b

Please sign in to comment.