---
type: "Source File"
title: "const QUESTIONS = ["
description: "const QUESTIONS = [ {q:\"AI will create more jobs than it destroys\",a:[ {t:\"Strongly agree\",p:18,c:\"historical_analogy_cope\"},{t:\"Somewhat agree\",p:12,c:\"gradualism_cope\"},{t:\"Not."
resource: "https://quiz.copecheck.com"
tags: ["copecheck", "quiz", "source-file", "js"]
timestamp: "2026-05-11T21:55:12Z"
site: "quiz"
source_path: "copecheck-quiz/static/js/quiz.js"
---

# const QUESTIONS = [

Source path: `copecheck-quiz/static/js/quiz.js`  
Index snapshot generated: `2026-11-24T13:27:52Z`  
File modified: `2026-05-11T21:55:12Z`

```js
const QUESTIONS = [
    {q:"AI will create more jobs than it destroys",a:[
        {t:"Strongly agree",p:18,c:"historical_analogy_cope"},{t:"Somewhat agree",p:12,c:"gradualism_cope"},{t:"Not sure",p:8,c:"partial_acknowledgment"},{t:"Somewhat disagree",p:3,c:"somewhat_lucid"},{t:"Strongly disagree",p:0,c:"reality"}]},
    {q:"My job/career is safe from AI automation",a:[
        {t:"Definitely safe",p:18,c:"sector_exceptionalism"},{t:"Probably safe",p:12,c:"copilot_fallacy"},{t:"Hard to say",p:7,c:"partial_acknowledgment"},{t:"Probably not",p:2,c:"somewhat_lucid"},{t:"Definitely not",p:0,c:"reality"}]},
    {q:"AI is just a tool, like a calculator",a:[
        {t:"Completely agree",p:18,c:"copilot_fallacy"},{t:"Mostly agree",p:13,c:"productivity_gospel"},{t:"Partly",p:7,c:"partial_acknowledgment"},{t:"Mostly disagree",p:2,c:"somewhat_lucid"},{t:"Completely disagree",p:0,c:"reality"}]},
    {q:"Governments can write laws that protect jobs from AI displacement",a:[
        {t:"Strongly agree",p:18,c:"regulatory_hopium"},{t:"Somewhat agree",p:12,c:"regulatory_hopium"},{t:"Neutral",p:7,c:"partial_acknowledgment"},{t:"Somewhat disagree",p:3,c:"somewhat_lucid"},{t:"Strongly disagree",p:0,c:"reality"}]},
    {q:"Creative work will always need humans",a:[
        {t:"Absolutely",p:18,c:"wishful_thinking"},{t:"Mostly yes",p:12,c:"human_premium_cope"},{t:"Some of it",p:7,c:"partial_acknowledgment"},{t:"Probably not",p:2,c:"somewhat_lucid"},{t:"AI is already better",p:0,c:"reality"}]},
    {q:"The transition will be gradual enough to adapt",a:[
        {t:"Definitely",p:18,c:"gradualism_cope"},{t:"Probably",p:12,c:"gradualism_cope"},{t:"Maybe",p:7,c:"partial_acknowledgment"},{t:"Unlikely",p:2,c:"somewhat_lucid"},{t:"Already too fast",p:0,c:"reality"}]},
    {q:"Education will evolve for an AI world",a:[
        {t:"Confident",p:18,c:"retraining_fantasy"},{t:"Hopeful",p:12,c:"retraining_fantasy"},{t:"Uncertain",p:7,c:"partial_acknowledgment"},{t:"Doubtful",p:3,c:"somewhat_lucid"},{t:"Already obsolete",p:0,c:"reality"}]},
    {q:"Will humans always need to check AI's work?",a:[
        {t:"Always — AI can't be trusted alone",p:18,c:"oversight_cope"},{t:"For a very long time",p:12,c:"oversight_cope"},{t:"For now, but not forever",p:6,c:"partial_acknowledgment"},{t:"Briefly — AI is getting good fast",p:2,c:"somewhat_lucid"},{t:"No — AI already checks AI",p:0,c:"reality"}]},
    {q:"UBI will solve the displacement problem",a:[
        {t:"Yes it's the answer",p:16,c:"partial_acknowledgment"},{t:"It'll help a lot",p:12,c:"partial_acknowledgment"},{t:"It's a band-aid",p:5,c:"somewhat_lucid"},{t:"It concedes the problem",p:2,c:"somewhat_lucid"},{t:"It's surrender not solution",p:0,c:"reality"}]},
    {q:"How quickly will AI replace most white-collar work?",a:[
        {t:"Never",p:20,c:"pure_cope"},{t:"20+ years",p:15,c:"heavy_cope"},{t:"10-20 years",p:10,c:"partial_cope"},{t:"5-10 years",p:4,c:"somewhat_lucid"},{t:"Under 5 years",p:0,c:"reality"}]},
    {q:"People said the same about the printing press",a:[
        {t:"Exactly, and it worked out",p:18,c:"historical_analogy_cope"},{t:"Good point, history repeats",p:12,c:"historical_analogy_cope"},{t:"Partially relevant",p:7,c:"partial_acknowledgment"},{t:"Different this time",p:2,c:"somewhat_lucid"},{t:"Completely different — AI replaces cognition",p:0,c:"reality"}]},
    {q:"There will always be demand for the human touch",a:[
        {t:"Absolutely",p:18,c:"human_premium_cope"},{t:"For most things",p:12,c:"human_premium_cope"},{t:"For some things",p:6,c:"partial_acknowledgment"},{t:"Less than people think",p:2,c:"somewhat_lucid"},{t:"People already prefer AI",p:0,c:"reality"}]},
    {q:"AI can't replace emotional intelligence jobs",a:[
        {t:"Agree completely",p:18,c:"empathy_shield"},{t:"Mostly agree",p:12,c:"empathy_shield"},{t:"Partially",p:7,c:"partial_acknowledgment"},{t:"Mostly disagree",p:2,c:"somewhat_lucid"},{t:"AI fakes empathy better",p:0,c:"reality"}]},
    {q:"My industry is different — AI can't disrupt it",a:[
        {t:"It requires human judgment",p:18,c:"sector_exceptionalism"},{t:"It's heavily regulated",p:14,c:"regulatory_hopium"},{t:"It requires physical presence",p:4,c:"somewhat_lucid"},{t:"No industry is safe",p:0,c:"reality"},{t:"Already being disrupted",p:0,c:"reality"}]},
    {q:"What should you do to prepare?",a:[
        {t:"Nothing, it won't happen",p:20,c:"pure_cope"},{t:"Learn AI tools",p:14,c:"copilot_fallacy"},{t:"Retrain in different field",p:10,c:"retraining_fantasy"},{t:"Move into trades",p:3,c:"somewhat_lucid"},{t:"No reliable preparation",p:0,c:"reality"}]},
    {q:"How do you feel about children's career prospects?",a:[
        {t:"Optimistic — more opportunities",p:18,c:"productivity_gospel"},{t:"Cautiously optimistic",p:12,c:"gradualism_cope"},{t:"Uncertain",p:7,c:"partial_acknowledgment"},{t:"Worried",p:2,c:"somewhat_lucid"},{t:"Terrified — traditional careers ending",p:0,c:"reality"}]},
    {q:"Tech leaders saying 'AI will be fine' are...",a:[
        {t:"Probably right, they know tech",p:16,c:"copilot_fallacy"},{t:"Mostly right, some blind spots",p:10,c:"partial_acknowledgment"},{t:"Biased but partly right",p:6,c:"partial_acknowledgment"},{t:"Selling something",p:2,c:"somewhat_lucid"},{t:"The definition of cope",p:0,c:"reality"}]},
    {q:"Economy will adapt like it adapted to the internet",a:[
        {t:"Definitely",p:18,c:"historical_analogy_cope"},{t:"Likely",p:12,c:"historical_analogy_cope"},{t:"Possibly",p:7,c:"partial_acknowledgment"},{t:"Internet didn't replace thinking",p:2,c:"somewhat_lucid"},{t:"Internet created jobs, AI eliminates them",p:0,c:"reality"}]},
    {q:"What % of jobs will AI eliminate in 10 years?",a:[
        {t:"Under 10%",p:18,c:"pure_cope"},{t:"10-25%",p:12,c:"heavy_cope"},{t:"25-50%",p:6,c:"partial_cope"},{t:"50-75%",p:2,c:"somewhat_lucid"},{t:"Over 75%",p:0,c:"reality"}]},
    {q:"Overall, AI's impact on employment will be...",a:[
        {t:"Hugely positive",p:20,c:"productivity_gospel"},{t:"Mostly positive",p:14,c:"copilot_fallacy"},{t:"Mixed",p:7,c:"partial_acknowledgment"},{t:"Mostly negative",p:2,c:"somewhat_lucid"},{t:"Catastrophic for most workers",p:0,c:"reality"}]}
];

const SPECTRUM = [
    {max:12,slug:"geoff-hinton",name:"Geoff Hinton",desc:"You see the discontinuity."},
    {max:25,slug:"eliezer-yudkowsky",name:"Eliezer Yudkowsky",desc:"Doomer with receipts."},
    {max:38,slug:"daron-acemoglu",name:"Daron Acemoglu",desc:"Cautious economist, data-first."},
    {max:50,slug:"yuval-harari",name:"Yuval Noah Harari",desc:"Philosopher of displacement."},
    {max:62,slug:"satya-nadella",name:"Satya Nadella",desc:"Optimistic but hedging."},
    {max:75,slug:"sam-altman",name:"Sam Altman",desc:"Trust the process. Probably."},
    {max:88,slug:"marc-andreessen",name:"Marc Andreessen",desc:"Software eats world. That's good."},
    {max:100,slug:"adam-dangelo",name:"Adam D'Angelo",desc:"Maximum cope. Nothing to see here."}
];

const COPE_LABELS = {
    copilot_fallacy:"Copilot Fallacy",regulatory_hopium:"Regulatory Hopium",
    productivity_gospel:"Productivity Gospel",historical_analogy_cope:"Historical Analogy Cope",
    wishful_thinking:"Wishful Thinking",sector_exceptionalism:"Sector Exceptionalism",
    human_premium_cope:"Human Premium Cope",empathy_shield:"Empathy Shield",
    gradualism_cope:"Gradualism Cope",retraining_fantasy:"Retraining Fantasy",
    oversight_cope:"Oversight Cope",partial_acknowledgment:"Partial Acknowledgment",
    somewhat_lucid:"Somewhat Lucid",reality:"Reality",pure_cope:"Pure Cope",
    heavy_cope:"Heavy Cope",partial_cope:"Partial Cope"
};

let currentQ = 0;
let selectedAnswers = {};
let answers = [];
let totalPoints = 0;
let startedAt = new Date().toISOString();

function resetQuiz() {
    currentQ = 0;
    selectedAnswers = {};
    answers = [];
    totalPoints = 0;
    startedAt = new Date().toISOString();
}

function getSpectrum(score) {
    for (const s of SPECTRUM) if (score <= s.max) return s;
    return SPECTRUM[SPECTRUM.length - 1];
}

function getMeterColor(pct) {
    if (pct < 25) return '#2a9d8f';
    if (pct < 50) return '#e9c46a';
    if (pct < 75) return '#f4a261';
    return '#e63946';
}

function getPrimaryCopeType() {
    const counts = {};
    for (const a of answers) {
        counts[a.cope_type] = (counts[a.cope_type] || 0) + 1;
    }
    let best = '', max = 0;
    for (const [k, v] of Object.entries(counts)) {
        if (v > max) { max = v; best = k; }
    }
    return best;
}

function renderQuestion() {
    const q = QUESTIONS[currentQ];
    const container = document.getElementById('quiz-area');
    const score = Math.min(totalPoints / 4, 100);

    // Update progress
    document.getElementById('progress-fill').style.width = ((currentQ / QUESTIONS.length) * 100) + '%';
    document.getElementById('progress-text').textContent = `Question ${currentQ + 1} of ${QUESTIONS.length}`;

    // Update cope meter
    const meterFill = document.getElementById('cope-fill');
    meterFill.style.width = score + '%';
    meterFill.style.background = getMeterColor(score);
    document.getElementById('cope-score-live').textContent = Math.round(score);

    // Check if this question was previously answered
    const prev = selectedAnswers[currentQ];

    // Build question card
    let html = `<div class="question-card active" id="qcard-${currentQ}">`;
    html += `<div class="question-num">Q${currentQ + 1}</div>`;
    html += `<div class="question-text">${q.q}</div>`;
    for (let i = 0; i < q.a.length; i++) {
        const a = q.a[i];
        const label = COPE_LABELS[a.c] || a.c;
        const isSelected = (prev && prev.aIdx === i);
        const selectedClass = isSelected ? ' selected' : '';
        const showTag = isSelected ? ' style="display:inline-block"' : '';
        html += `<button class="answer-btn${selectedClass}" onclick="selectAnswer(${currentQ},${i},${a.p},'${a.c}')">`;
        html += `${a.t}<span class="cope-tag"${showTag}>${label}</span></button>`;
    }
    if (currentQ > 0) {
        html += `<button class="back-btn" onclick="goBack()">&#8592; Go Back</button>`;
    }
    html += `</div>`;
    container.innerHTML = html;
}

function selectAnswer(qNum, aIdx, points, copeType) {
    // Highlight selected
    const btns = document.querySelectorAll('.answer-btn');
    btns.forEach(b => b.classList.remove('selected'));
    btns[aIdx].classList.add('selected');

    // Store/update this question's answer
    selectedAnswers[qNum] = {
        aIdx: aIdx,
        points: points,
        copeType: copeType
    };

    // Rebuild answers array and recalculate totalPoints from selectedAnswers
    answers = [];
    totalPoints = 0;
    for (let i = 0; i < QUESTIONS.length; i++) {
        if (selectedAnswers[i]) {
            answers.push({
                question_num: i + 1,
                answer_index: selectedAnswers[i].aIdx,
                cope_points: selectedAnswers[i].points,
                cope_type: selectedAnswers[i].copeType
            });
            totalPoints += selectedAnswers[i].points;
        }
    }

    // Disable all buttons and back button during transition
    btns.forEach(b => b.style.pointerEvents = 'none');
    const backBtn = document.querySelector('.back-btn');
    if (backBtn) backBtn.style.pointerEvents = 'none';

    setTimeout(() => {
        currentQ = qNum + 1;
        if (currentQ < QUESTIONS.length) {
            renderQuestion();
        } else {
            showScrewedSection();
        }
    }, 800);
}

function goBack() {
    if (currentQ > 0) {
        currentQ--;
        renderQuestion();
    }
}

function showScrewedSection() {
    document.getElementById('quiz-area').innerHTML = '';
    document.getElementById('progress-wrap').style.display = 'none';

    // Final cope meter update
    const score = Math.min(totalPoints / 4, 100);
    document.getElementById('cope-fill').style.width = score + '%';
    document.getElementById('cope-fill').style.background = getMeterColor(score);
    document.getElementById('cope-score-live').textContent = Math.round(score);

    document.getElementById('screwed-section').classList.add('active');
}

function skipScrewed() {
    document.getElementById('screwed-section').classList.remove('active');
    showCommentsSection();
}

function submitScrewed() {
    document.getElementById('screwed-section').classList.remove('active');
    showCommentsSection();
}

function showCommentsSection() {
    document.getElementById('comments-section').classList.add('active');
}

function skipComments() {
    document.getElementById('comments-section').classList.remove('active');
    submitAll();
}

function submitComments() {
    document.getElementById('comments-section').classList.remove('active');
    submitAll();
}

function submitAll() {
    const score = Math.min(totalPoints / 4, 100);
    const data = {
        answers: answers,
        cope_score: score,
        primary_cope_type: getPrimaryCopeType(),
        started_at: startedAt,
        screwed_job: document.getElementById('screwed-job')?.value || null,
        screwed_industry: document.getElementById('screwed-industry')?.value || null,
        screwed_experience: document.getElementById('screwed-exp')?.value || null,
        screwed_computer_pct: parseInt(document.getElementById('screwed-computer')?.value) || null,
        screwed_worry: parseInt(document.getElementById('screwed-worry')?.value) || null,
        comments_text: document.getElementById('comments-text')?.value || null
    };

    // Show loading
    document.getElementById('quiz-area').innerHTML = '<div style="text-align:center;padding:3rem"><div class="oracle-loading"><span class="spinner"></span> Calculating your cope levels...</div></div>';
    document.getElementById('cope-meter-wrap').style.display = 'none';

    fetch('/api/submit', {
        method: 'POST',
        headers: {'Content-Type': 'application/json'},
        body: JSON.stringify(data)
    })
    .then(r => r.json())
    .then(res => {
        if (res.session_id) {
            window.location.href = '/results/' + res.session_id;
        } else {
            document.getElementById('quiz-area').innerHTML = '<div class="card" style="text-align:center"><p>Something went wrong. Please try again.</p></div>';
        }
    })
    .catch(() => {
        document.getElementById('quiz-area').innerHTML = '<div class="card" style="text-align:center"><p>Connection error. Please try again.</p></div>';
    });
}

// Results page functions
function loadOracle(sessionId) {
    const el = document.getElementById('oracle-content');
    if (!el) return;
    el.innerHTML = '<div class="oracle-loading"><span class="spinner"></span> The Oracle is analysing your cope...</div>';

    fetch('/api/oracle', {
        method: 'POST',
        headers: {'Content-Type': 'application/json'},
        body: JSON.stringify({session_id: sessionId})
    })
    .then(r => r.json())
    .then(res => {
        if (res.oracle) {
            const html = typeof marked !== 'undefined' ? marked.parse(res.oracle) : res.oracle.replace(/\n/g, '<br>');
            el.innerHTML = '<div class="oracle-text">' + html + '</div>';
            document.getElementById('argue-section').style.display = 'block';
        } else if (res.error) {
            el.innerHTML = '<p style="color:var(--text-dim)">' + res.error + '</p>';
        }
    })
    .catch(() => {
        el.innerHTML = '<p style="color:var(--text-dim)">Oracle unavailable right now. Try refreshing.</p>';
    });
}

let argueHistory = [];

function sendArgue(sessionId) {
    const input = document.getElementById('argue-input');
    const msg = input.value.trim();
    if (!msg) return;
    input.value = '';

    const messages = document.getElementById('argue-messages');
    messages.innerHTML += `<div class="argue-msg user"><div class="role">You</div>${msg}</div>`;
    messages.scrollTop = messages.scrollHeight;

    argueHistory.push({role: 'user', text: msg});

    fetch('/api/argue', {
        method: 'POST',
        headers: {'Content-Type': 'application/json'},
        body: JSON.stringify({session_id: sessionId, message: msg, history: argueHistory})
    })
    .then(r => r.json())
    .then(res => {
        if (res.reply) {
            argueHistory.push({role: 'oracle', text: res.reply});
            const replyHtml = typeof marked !== 'undefined' ? marked.parse(res.reply) : res.reply.replace(/\n/g, '<br>');
            messages.innerHTML += `<div class="argue-msg oracle"><div class="role">Oracle</div>${replyHtml}</div>`;
            messages.scrollTop = messages.scrollHeight;
            if (res.final) {
                document.getElementById('argue-input').disabled = true;
                document.getElementById('argue-send').disabled = true;
            }
        } else if (res.error) {
            messages.innerHTML += `<div class="argue-msg oracle"><div class="role">System</div>${res.error}</div>`;
        }
    })
    .catch(() => {
        messages.innerHTML += `<div class="argue-msg oracle"><div class="role">System</div>Connection error.</div>`;
    });
}

function toggleCollapsible(el) {
    const body = el.nextElementSibling;
    body.classList.toggle('open');
    el.querySelector('.arrow').textContent = body.classList.contains('open') ? '▲' : '▼';
}

function copyShareLink() {
    navigator.clipboard.writeText(window.location.href).then(() => {
        const btn = document.getElementById('copy-btn');
        btn.textContent = 'Copied!';
        setTimeout(() => btn.textContent = 'Copy Link', 2000);
    });
}

function shareTwitter(score, figure) {
    const text = `I scored ${score}/100 on the CopeCheck Quiz — ${figure} on the Hinton-Andreessen spectrum. How much are you coping about AI displacement?`;
    const url = window.location.href;
    window.open(`https://x.com/intent/tweet?text=${encodeURIComponent(text)}&url=${encodeURIComponent(url)}`, '_blank', 'width=550,height=420');
}

function shareLinkedIn(score, figure) {
    const url = window.location.href;
    window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(url)}`, '_blank', 'width=550,height=520');
}

function shareWhatsApp(score, figure) {
    const text = `I scored ${score}/100 on the CopeCheck Quiz — ${figure} on the Hinton-Andreessen spectrum. How much are you coping? ${window.location.href}`;
    window.open(`https://wa.me/?text=${encodeURIComponent(text)}`, '_blank');
}

function shareReddit(score, figure) {
    const title = `I scored ${score}/100 on the CopeCheck Quiz — ${figure}`;
    const url = window.location.href;
    window.open(`https://www.reddit.com/submit?url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}`, '_blank');
}

// Init quiz if on quiz page
document.addEventListener('DOMContentLoaded', () => {
    if (document.getElementById('quiz-area')) {
        resetQuiz();
        // Also reset form fields
        const job = document.getElementById('screwed-job');
        if (job) job.value = '';
        const ind = document.getElementById('screwed-industry');
        if (ind) ind.selectedIndex = 0;
        const exp = document.getElementById('screwed-exp');
        if (exp) exp.selectedIndex = 0;
        const comp = document.getElementById('screwed-computer');
        if (comp) { comp.value = 50; const cv = document.getElementById('comp-val'); if (cv) cv.textContent = '50'; }
        const worry = document.getElementById('screwed-worry');
        if (worry) { worry.value = 5; const wv = document.getElementById('worry-val'); if (wv) wv.textContent = '5'; }
        const comments = document.getElementById('comments-text');
        if (comments) comments.value = '';

        // Reset UI visibility
        const pw = document.getElementById('progress-wrap');
        if (pw) pw.style.display = '';
        const cm = document.getElementById('cope-meter-wrap');
        if (cm) cm.style.display = '';
        const ss = document.getElementById('screwed-section');
        if (ss) ss.classList.remove('active');
        const cs = document.getElementById('comments-section');
        if (cs) cs.classList.remove('active');

        // Reset cope meter
        const fill = document.getElementById('cope-fill');
        if (fill) { fill.style.width = '0%'; fill.style.background = '#2a9d8f'; }
        const liveScore = document.getElementById('cope-score-live');
        if (liveScore) liveScore.textContent = '0';

        renderQuestion();
    }
});
```
