Skip to content

Commit

Permalink
New changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaNwaizu committed Feb 2, 2024
1 parent 6bd3654 commit 0e5fcd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion end.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ const mostRecentScore = localStorage.getItem('mostRecentScore'),
finalScoreText = localStorage.getItem('finalScore'),
selectedThemeEnd = localStorage.getItem('selected-theme'),
selectedIconEnd = localStorage.getItem('selected-icon')





const theFinalText = finalScoreText
scoreRemains.innerText = `Got ${theFinalText} out of ${MAX_QUESTIONS} questions`
finalScore.innerText = mostRecentScore
finalScore.innerText = mostRecentScore + 1

if (selectedIconEnd) {
navBox.classList.toggle(selectedIconEnd)
Expand Down
3 changes: 2 additions & 1 deletion html-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fetch('questions.json')
const CORRECT_BONUS = 5
let htmlQuestionsIndex = htmlQuestions.length
let MAX_QUESTIONS;
console.log(MAX_QUESTIONS)

const startGame = () => {
questionCounter = 0
score = 0
Expand All @@ -54,6 +54,7 @@ const startGame = () => {
getNewQuestions()
game.classList.remove('hidden')

localStorage.setItem('avaliableQuestions', availableQuestions)
}

const getNewQuestions = () => {
Expand Down

0 comments on commit 0e5fcd8

Please sign in to comment.