assets/js/app.js
//Ends the quiz and calculates score
Ends the quiz and calculates score
Ends the quiz and calculates score
function endQuiz() {
    clearInterval(timer);
    if (timeLeft > 0) {
        successSound.play();
    }
    clearPage();
    loadQuizResults();
}
function endQuiz ( ) { clearInterval ( timer ) ; if ( timeLeft > 0 ) { successSound . play ( ) ; } clearPage ( ) ; loadQuizResults ( ) ; }
Ends the quiz and calculates score
Ends the quiz and calculates score
// In case the timer is still running, clear it. // If we finished the quiz without the timer running out, let's play a happier quiz over sound // Clear the page and load the results