var iqscore = 100; function getSnarkyRemark() { if (iqscore < 0) { return("Hmm... I'm guessing that you didn't go to any schooling beyond what's mandatory. Hey, just like most other Trump supporters!"); } else if (iqscore == 50) { return("Why didn't you register to vote? You could have saved democracy in America..."); } else if (iqscore == 200) { return("Only thing keeping you from greatness is all the other idiots living in America :/"); } else if (iqscore == 250) { return("Pity you don't live in America to help fight against the forces of evil."); } } function getResult() { const resultPlaceholder = document.getElementById('resultPlaceholder'); if (resultPlaceholder) { resultPlaceholder.textContent = `is about ${iqscore} IQ!`; } const snarkyRemark = document.getElementById('snarkyRemark'); if (snarkyRemark) { snarkyRemark.textContent = getSnarkyRemark(); } } function international() { iqscore += 50; const qone = document.getElementById('q1'); if (qone) { qone.style.display = 'none'; } const qtwob = document.getElementById('q2b'); if (qtwob) { qtwob.style.display = 'block'; } } function americanCitizen() { iqscore -= 50; const qone = document.getElementById('q1'); if (qone) { qone.style.display = 'none'; } const qtwoa = document.getElementById('q2a'); if (qtwoa) { qtwoa.style.display = 'block'; } } function voted() { iqscore += 50; const qtwoa = document.getElementById('q2a'); if (qtwoa) { qtwoa.style.display = 'none'; } const qthree = document.getElementById('q3'); if (qthree) { qthree.style.display = 'block'; } } function novoted() { iqscore -= 100; const qtwoa = document.getElementById('q2a'); if (qtwoa) { qtwoa.style.display = 'none'; } const qtwob = document.getElementById('q2b'); if (qtwob) { qtwob.style.display = 'block'; } } function smartPerson() { iqscore += 100; const qtwob = document.getElementById('q2b'); if (q2b) { q2b.style.display = 'none'; } const qthree = document.getElementById('q3'); if (qthree) { qthree.style.display = 'none'; } const iqresult = document.getElementById('iqresult'); if (iqresult) { iqresult.style.display = 'block'; getResult() } } function noBrainCells() { iqscore -= 500; const qtwob = document.getElementById('q2b'); if (q2b) { q2b.style.display = 'none'; } const qthree = document.getElementById('q3'); if (qthree) { qthree.style.display = 'none'; } const iqresult = document.getElementById('iqresult'); if (iqresult) { iqresult.style.display = 'block'; getResult() } }