diff --git a/index.js b/index.js index 59f1cb0..841c074 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,7 @@ function nameSubmit() { score: 0, startTime: new Date(), }; + const startTime = new Date(); localStorage.setItem("studData", JSON.stringify(studData)); localStorage.setItem("startTime", JSON.stringify(startTime)); var privacyViolation = document.getElementById("privacyViolation"); @@ -165,7 +166,7 @@ function nextQ() { if (questionCounter < questions.length - 1) questionCounter++; else - finishQuiz(); + initScore(); setQ(questionCounter); if (questionCounter < questions.length) }