function showQuestion() {
    let currentQuestion = questions[index];
    questionBox.innerHTML = currentQuestion.question;

    let options = currentQuestion.options;
    for (i = 0; i < options.length; i++) {
        document.querySelector(`#option-btn-${i}`).textContent = options[i];
        document.querySelector(`#option-btn-${i}`).setAttribute('value', options[i]);
    }
}
// This function will fill the corresponding HTML elements with the question, and answer options
This function will fill the corresponding HTML elements with the question, and answer options
This function will fill the corresponding HTML elements with the question and answer options
function showQuestion() {
    let currentQuestion = questions[index];
    questionBox.innerHTML = currentQuestion.question;
    let options = currentQuestion.options;
    for (i = 0; i < options.length; i++) {
        document.querySelector(`#option-btn-${i}`).textContent = options[i];
        document.querySelector(`#option-btn-${i}`).setAttribute('value', options[i]);
    }
}
function showQuestion ( ) { let currentQuestion = questions [ index ] ; questionBox . innerHTML = currentQuestion . question ; let options = currentQuestion . options ; for ( i = 0 ; i < options . length ; i ++ ) { document . querySelector ( ` ${ i } ` ) . textContent = options [ i ] ; document . querySelector ( ` ${ i } ` ) . setAttribute ( 'value' , options [ i ] ) ; } }
This function will fill the corresponding HTML elements with the question, and answer options
This function will fill the corresponding HTML elements with the question and answer options