function renderQuestions() {
  questions.classList.remove("d-none");
  question.textContent = questionsList[qIndex].question;
  choices.innerHTML = "";

  // Render answer buttons
  for (var i = 0; i < questionsList[qIndex].choices.length; i++) {
    var answerBtn = choices.appendChild(document.createElement("button"));
    answerBtn.classList.add("btn", "btn-primary", "btn-sm", "btn-block");
    answerBtn.textContent = questionsList[qIndex].choices[i];
  }
}
// Render all question of the current question index in questions.js
Render all question of the current question index in questions.js
Render all question of the current question index in questions . js
function renderQuestions() {
  questions.classList.remove("d-none");
  question.textContent = questionsList[qIndex].question;
  choices.innerHTML = "";
  for (var i = 0; i < questionsList[qIndex].choices.length; i++) {
    var answerBtn = choices.appendChild(document.createElement("button"));
    answerBtn.classList.add("btn", "btn-primary", "btn-sm", "btn-block");
    answerBtn.textContent = questionsList[qIndex].choices[i];
  }
}
function renderQuestions ( ) { questions . classList . remove ( "d-none" ) ; question . textContent = questionsList [ qIndex ] . question ; choices . innerHTML = "" ; for ( var i = 0 ; i < questionsList [ qIndex ] . choices . length ; i ++ ) { var answerBtn = choices . appendChild ( document . createElement ( "button" ) ) ; answerBtn . classList . add ( "btn" , "btn-primary" , "btn-sm" , "btn-block" ) ; answerBtn . textContent = questionsList [ qIndex ] . choices [ i ] ; } }
Render all question of the current question index in questions.js
Render all question of the current question index in questions . js
// Render answer buttons