date out of user
This commit is contained in:
3
index.js
3
index.js
@@ -9,6 +9,7 @@ function nameSubmit() {
|
|||||||
score: 0,
|
score: 0,
|
||||||
startTime: new Date(),
|
startTime: new Date(),
|
||||||
};
|
};
|
||||||
|
const startTime = new Date();
|
||||||
localStorage.setItem("studData", JSON.stringify(studData));
|
localStorage.setItem("studData", JSON.stringify(studData));
|
||||||
localStorage.setItem("startTime", JSON.stringify(startTime));
|
localStorage.setItem("startTime", JSON.stringify(startTime));
|
||||||
var privacyViolation = document.getElementById("privacyViolation");
|
var privacyViolation = document.getElementById("privacyViolation");
|
||||||
@@ -165,7 +166,7 @@ function nextQ() {
|
|||||||
if (questionCounter < questions.length - 1)
|
if (questionCounter < questions.length - 1)
|
||||||
questionCounter++;
|
questionCounter++;
|
||||||
else
|
else
|
||||||
finishQuiz();
|
initScore();
|
||||||
setQ(questionCounter);
|
setQ(questionCounter);
|
||||||
if (questionCounter < questions.length)
|
if (questionCounter < questions.length)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user