Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyEye-FAST committed Jul 11, 2024
1 parent 2a6e5b0 commit b5f1661
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/js/quiz.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
$(document).ready(function () {
let currentQuestionIndex = 0;
console.log("当前问题索引:", currentQuestionIndex);
const questions = questionsData;
const questionKeys = Object.keys(questions);
const delayBetweenQuestions = 800;
Expand Down Expand Up @@ -57,15 +58,14 @@ $(document).ready(function () {
if (input === correctAnswer) {
setTimeout(() => {
currentQuestionIndex++;
console.log("当前问题索引:", currentQuestionIndex);
if (currentQuestionIndex < questionKeys.length) {
loadQuestion();
} else {
showSummary();
}
}, delayBetweenQuestions);
}

console.log("当前问题索引:", currentQuestionIndex);
}

function showSummary() {
Expand Down

0 comments on commit b5f1661

Please sign in to comment.