function startTimer(){
    timer = setInterval(function() {
        timerCount--;
        timeLeft.textContent = timerCount;
        if(timerCount == 0 || i == questions.length){
            clearInterval(timer);
            endGame();
        }

    }, 1000);
}
//timer in the top right of website
timer in the top right of website
timer in the top right of website
function startTimer(){
    timer = setInterval(function() {
        timerCount--;
        timeLeft.textContent = timerCount;
        if(timerCount == 0 || i == questions.length){
            clearInterval(timer);
            endGame();
        }
    }, 1000);
}
function startTimer ( ) { timer = setInterval ( function ( ) { timerCount -- ; timeLeft . textContent = timerCount ; if ( timerCount == 0 || i == questions . length ) { clearInterval ( timer ) ; endGame ( ) ; } } , 1000 ) ; }
timer in the top right of website
timer in the top right of website