script.js
// Declaring function Start Game, will execute when called.
Declaring function Start Game, will execute when called.
Declaring function Start Game will execute when called .
function startGame() {
    console.log("Start");
    startButton.classList.add("hide");
    gameInfoElement.classList.add("hide");
    shuffledQuestions = quiz.sort(() => Math.random() - .5);
    currentQuestionIndex = 0;
    remainingTimeSeconds = 75;
    updateTimeRemaining(0);
    showQuestion(shuffledQuestions[currentQuestionIndex]);
    gameTimer = setInterval(function () {
        updateTimeRemaining(1);
    }, 1000);
}
function startGame ( ) { console . log ( "Start" ) ; startButton . classList . add ( "hide" ) ; gameInfoElement . classList . add ( "hide" ) ; shuffledQuestions = quiz . sort ( ( ) => Math . random ( ) - .5 ) ; currentQuestionIndex = 0 ; remainingTimeSeconds = 75 ; updateTimeRemaining ( 0 ) ; showQuestion ( shuffledQuestions [ currentQuestionIndex ] ) ; gameTimer = setInterval ( function ( ) { updateTimeRemaining ( 1 ) ; } , 1000 ) ; }
Declaring function Start Game, will execute when called.
Declaring function Start Game will execute when called .
// When function is called, it will print Start // Adding hide class to below variables // Start the game timer.