From f09fd34d430295d63fe7c66cae02f6d064312dfb Mon Sep 17 00:00:00 2001 From: LinlyBoi Date: Mon, 11 Dec 2023 01:45:30 +0200 Subject: [PATCH] date out of user --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) }