Sunday, January 18, 2026

Ei

English Quiz
)
` }, { q:"If yesterday was tomorrow, what day is today?", options:["Friday","Saturday","Sunday","Monday"], correct:2, reason:"The logical shift gives Sunday.", topAd:`
๐Ÿ”ผ Ad Code 2
` }, { q:"What has one eye but canโ€™t see?", options:["Needle","Storm","Camera","Potato"], correct:0, reason:"A needle has an eye.", topAd:`
๐Ÿ”ผ Ad Code 3
` }, { q:"What goes up when rain comes down?", options:["Umbrella","Water","River","Cloud"], correct:0, reason:"Umbrella goes up.", topAd:`` } ]; /* ====================== AUTO QUIZ GENERATOR ====================== */ const quizDiv = document.getElementById("quiz"); questions.forEach((item,index)=>{ quizDiv.innerHTML += `
${item.topAd || ""}
Q${index+1}. ${item.q}
${item.options.map((opt,i)=>` `).join("")}
โœ”๏ธ Correct Answer: ${item.options[item.correct]}
${item.reason}
`; }); function checkAnswer(qIndex,btn){ const buttons = btn.parentElement.querySelectorAll("button"); const ansBox = document.getElementById("ans"+qIndex); buttons.forEach(b=>{ b.disabled=true; if(b.dataset.correct==="true"){ b.classList.add("correct-btn"); } }); if(btn.dataset.correct==="false"){ btn.classList.add("wrong-btn"); } ansBox.style.display="block"; }

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home