Skip to content

Commit

Permalink
Added Quiz Count
Browse files Browse the repository at this point in the history
  • Loading branch information
JiyaGupta-cs committed Jan 28, 2024
1 parent 407e596 commit 2f9b128
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Pages/Quizes/tests/button-9/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ <h1>Sequence & Series</h1>
<div class="quiz-container" id="quiz">

<div class="quiz-header">
<div id="difficulty"></div>
<div style="display: flex;">
<div id="difficulty" style="flex:1"></div>
<div id="quizcount" style="font-weight: bold;"></div>
</div>
<h2 id="question">Question is loading...</h2>

<ul class="quiz-ul">
Expand Down
2 changes: 2 additions & 0 deletions Pages/Quizes/tests/button-9/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const quizData = [
const d_text = document.getElementById("d_text");
const submitButton = document.getElementById("submit");
const difficulty = document.getElementById("difficulty");
const quizcount = document.getElementById("quizcount");

let currentQuiz = 0;
let score = 0;
Expand All @@ -137,6 +138,7 @@ const quizData = [
c_text.innerText = currentQuizData.c;
d_text.innerText = currentQuizData.d;
difficulty.innerText = currentQuizData.difficulty;
quizcount.innerText = currentQuiz+1+"/"+quizData.length;
};

loadQuiz();
Expand Down

0 comments on commit 2f9b128

Please sign in to comment.