js/main.js
//  compare user's with correct answers
compare user's with correct answers
compare user ' s with correct answers
function correctAnswer(userData) {
  for (let answer of userData) {
    var userKey = answer[0];
    var userValue = answer[1];
    if (userValue === quizData[userKey]) {
      score++;
    }
  }
  document.getElementById("score").innerText = scoreDiplay(score);
  userForm.style.display = "none";
}
function correctAnswer ( userData ) { for ( let answer of userData ) { var userKey = answer [ 0 ] ; var userValue = answer [ 1 ] ; if ( userValue === quizData [ userKey ] ) { score ++ ; } } document . getElementById ( "score" ) . innerText = scoreDiplay ( score ) ; userForm . style . display = "none" ; }
compare user's with correct answers
compare user ' s with correct answers