diff --git a/script.js b/script.js index d011f38..0c2e5f5 100644 --- a/script.js +++ b/script.js @@ -153,7 +153,7 @@ function checkAnswers() { inputs.forEach((input, answerIndex) => { const label = document.querySelector(`label[for="q${questionIndex + 1}a${answerIndex}"]`); - const isCorrect = question.correctAnswers.includes(label.innerHTML); + const isCorrect = question.correctAnswers.includes(label.textContent); // Add class to the label based on whether the answer is correct or not if (isCorrect) {