assets/javascript/app.js
// function to display question and answer choices
function to display question and answer choices
function to display question and answer choices
function displayQuestion() {
    html = '';
    for (key in questions[questionCounter].answers) {
      var index = parseInt(key) + 1;
      html += `<h3 class = 'answer'>${index}: ${
        questions[questionCounter].answers[key]
      }</h3>`;
    }
    $('#trivia').html(
      `<h4> Time Remaining: <span id='time'>20</span> seconds </h4> <hr> <h2> ${
        questions[questionCounter].question
      }</h2> <p> ${html}`
    );
  }
function displayQuestion ( ) { html = '' ; for ( key in questions [ questionCounter ] . answers ) { var index = parseInt ( key ) + 1 ; html += ` ${ index } ${ questions [ questionCounter ] . answers [ key ] } ` ; } $ ( '#trivia' ) . html ( ` ${ questions [ questionCounter ] . question } ${ html } ` ) ; }
function to display question and answer choices
function to display question and answer choices