let currentScore = 0; let answeredCount = 0;
const percent = (currentScore / questions.length) * 100; let feedback = ""; conditional clauses exercises
let optionsHTML = ''; q.options.forEach((opt, i) => optionsHTML += `<button class="option-btn" onclick="checkAnswer($index, $i)">$opt</button>`; ); let currentScore = 0; let answeredCount = 0;
document.getElementById('feedback-text').innerText = feedback; " + question
The following guide breaks down the five main types of conditionals with targeted and common pitfalls to help you refine your grammar. 1. Zero Conditional: General Truths
if (aIndex === question.correct) buttons[aIndex].classList.add('correct'); feedbackDiv.style.color = "var(--correct)"; feedbackDiv.innerText = "Correct! " + question.explanation; currentScore++; else buttons[aIndex].classList.add('incorrect'); buttons[question.correct].classList.add('correct'); // Show correct answer feedbackDiv.style.color = "var(--incorrect)"; feedbackDiv.innerText = "Incorrect. " + question.explanation;
.theory-box table width: 100%; border-collapse: collapse; margin-top: 10px; .theory-box th, .theory-box td padding: 8px; text-align: left; border-bottom: 1px solid #ddd; font-size: 0.9em; .theory-box th background-color: #dce4ec;