From e76d0fdcd1f3b7214a639c51b8cbf8722e3ef12c Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Mon, 16 Sep 2024 10:44:45 +0200 Subject: [PATCH] queation variable and view --- oppgaver/uke6/8ball/controller.js | 2 +- oppgaver/uke6/8ball/model.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/oppgaver/uke6/8ball/controller.js b/oppgaver/uke6/8ball/controller.js index 8ddb1a9..03ff5ec 100644 --- a/oppgaver/uke6/8ball/controller.js +++ b/oppgaver/uke6/8ball/controller.js @@ -5,7 +5,7 @@ function pickRandomAnswer(){ randomAnswer = randomAnswersArrary[Math.floor(Math.random() * randomAnswersArrary.length)] htmlAnswer = /*HTML*/ ` -
Question:

+
Question: ${question}

Answer: ${randomAnswer}
`; clearScreen(); diff --git a/oppgaver/uke6/8ball/model.js b/oppgaver/uke6/8ball/model.js index 5a32c0a..47766e2 100644 --- a/oppgaver/uke6/8ball/model.js +++ b/oppgaver/uke6/8ball/model.js @@ -19,11 +19,12 @@ const negativeAnswers = [ ]; var html = /*HTML*/`
8-ball
- Ask Your question:
+ Ask Your question:
`; var htmlAnswer = ''; var answerArray = []; var randomAnswersArrary = []; -var randomAnswer; \ No newline at end of file +var randomAnswer; +var question; \ No newline at end of file