From 54319691f7469816743ddada9c8e9912f031e72a Mon Sep 17 00:00:00 2001 From: LinlyBoi Date: Mon, 4 Dec 2023 17:50:42 +0200 Subject: [PATCH] this is still broken but getting there --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index 1e93258..e68963e 100644 --- a/index.js +++ b/index.js @@ -102,6 +102,13 @@ console.log(questions); function setQ(n) { var question = document.getElementById("question") question.innerText = questions[n].title; + for (let i = 0; i < questions.length; i++) { + let index = i+1; + var q = document.getElementById(`ans${index}`); + for (let j = 0; j < question.answers.length; j++) { + q.innerText = questions[i].answers[i].text; + } + } } var questionCounter = 0;