title: Image won't display as variable reaches certain value
body: <p>I won't include all the code because it is really a lot but here is most of it:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  
  &lt;head&gt;
  
  &lt;title&gt; CaroQuiz &lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div&gt;
  
  
  &lt;div class=&quot;quiz&quot;&gt;&lt;img src=&quot;bilder/text.png&quot;&gt;
  
  &lt;div class=&quot;name&quot;&gt; &lt;img src=&quot;bilder/name.png&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;hr&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;hr2&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;text2&quot;&gt; &lt;img src=&quot;bilder/text2.png&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;text3&quot;&gt; &lt;img src=&quot;bilder/text3.png&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;school&quot;&gt; &lt;img src=&quot;bilder/school.jpg&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;hr3&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;question1&quot;&gt; &lt;img src=&quot;bilder/question1.png&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;text4&quot;&gt; &lt;img src=&quot;bilder/text4.png&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;question2&quot;&gt; &lt;img src=&quot;bilder/question2.png&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;text5&quot;&gt; &lt;img src=&quot;bilder/text5.png&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;text6&quot;&gt; &lt;img src=&quot;bilder/text6.png&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;question3&quot;&gt; &lt;img src=&quot;bilder/question3.png&quot;&gt; &lt;/div&gt;
  
  &lt;div class=&quot;question4&quot;&gt; &lt;img src=&quot;bilder/question4.png&quot;&gt; &lt;/div&gt;
  
  
  
  
  &lt;button class=&quot;button&quot; button onclick=&quot;answerOne()&quot;&gt; Math &lt;/button&gt;
  
  &lt;button class=&quot;button2&quot; button onclick=&quot;answerTwo()&quot;&gt; Physical Education &lt;/button&gt;
  
  &lt;button class=&quot;button3&quot; button onclick=&quot;answerThree()&quot;&gt; History &lt;/button&gt;
  
  &lt;button class=&quot;button4&quot; button onclick=&quot;answerFour()&quot;&gt; Arts and crafts &lt;/button&gt;
  
  &lt;button class=&quot;button5&quot; button onclick=&quot;answerFive()&quot;&gt; I don't have any &lt;/button&gt;
  
  &lt;button class=&quot;button6&quot; button onclick=&quot;answerSix()&quot;&gt; 1-2 &lt;/button&gt;
  
  &lt;button class=&quot;button7&quot; button onclick=&quot;answerSeven()&quot;&gt; 3-5 &lt;/button&gt;
  
  &lt;button class=&quot;button8&quot; button onclick=&quot;answerEight()&quot;&gt; More than I can count &lt;/button&gt;
  
  &lt;button class=&quot;button9&quot; button onclick=&quot;answerNine()&quot;&gt; No &lt;/button&gt;
  
  &lt;button class=&quot;button10&quot; button onclick=&quot;answerTen()&quot;&gt; Yes &lt;/button&gt;
  
  &lt;button class=&quot;button11&quot; button onclick=&quot;answerEleven()&quot;&gt; I just ignore them &lt;/button&gt;
  
  &lt;button class=&quot;button12&quot; button onclick=&quot;answerTwelve()&quot;&gt; Somewhat &lt;/button&gt;
  
  &lt;div class=&quot;text7&quot;&gt; &lt;img src=&quot;bilder/text7.png&quot;&gt; &lt;/div&gt;
  
  
  &lt;/div&gt;
  
  &lt;button class=&quot;button14&quot; button onclick=&quot;answerThirteen()&quot;&gt; I only get A-s and B-s &lt;/button&gt;
  
  &lt;button class=&quot;button15&quot; button onclick=&quot;answerFourteen()&quot;&gt; I get B-s and C-s &lt;/button&gt;
  
  &lt;button class=&quot;button16&quot; button onclick=&quot;answerFifteen()&quot;&gt; I get D-s and E-s &lt;/button&gt;
  
  &lt;button class=&quot;button17&quot; button onclick=&quot;answerSixteen()&quot;&gt; I failed every subject &lt;/button&gt;
  
  &lt;div class=&quot;finale&quot;&gt; &lt;img src=&quot;bilder/Finale.png&quot;&gt; 
  
  &lt;button class=&quot;button18&quot; button onclick=&quot;check()&quot;&gt; Yes! &lt;/button&gt;
  
  
  var poeng = 0;
                               
  function answerOne() {
  
  poeng = 200;
  
  console.log(poeng)
  check()
  }
  
  function answerTwo() {
  
  poeng = -300;
  
  console.log(poeng)
  check()
  }
  
  function answerThree() {
  
  poeng = 500;
  
  console.log(poeng)
  check()
  }
  
  function answerFour() {
  
  poeng = 600;
  
  console.log(poeng)
  check()
  }
  
  function answerFive() {
  
  if(poeng == 200) {
  
  poeng = poeng + 0;
  
  console.log(poeng)
  check()
  }
  
  else if (poeng == -300) {
  
  poeng = poeng - 300;
  
  console.log(poeng)
  check()
  }
  
  else if (poeng == 500) {
  
  poeng = poeng - 1000;
  
  console.log(poeng)
  check()
  }
  
  else if (poeng == 600) {
  
  poeng = poeng + 0;
  
  console.log(poeng)
  check()
  }
  
  console.log(poeng)
  check()
  }
  
  function answerSix() {
  
  if(poeng == 200) {
  
  poeng = poeng + 0;
  
  console.log(poeng)
  check()
  }
  
  else if(poeng == -300) {
  
  poeng = poeng + 0;
  
  console.log(poeng)
  check()
  }
  
  else if(poeng == 500) {
  
  poeng = poeng + 0;
  
  console.log(poeng)
  check()
  }
  
  else if(poeng == 600) {
  
  poeng = poeng + 0;
  
  console.log(poeng)
  check()
  }
  
  function check() {
  
  if(poeng == 200) {
  
   document.write('&lt;img style=&quot;position: relative; top: 500px; left: 200px;&quot; src=&quot;bilder/cat2.jpg&quot;&gt;');
      
   
  
      
   }
  }
  </code></pre>
  <p>Okay so what is supposed to happen is that you have multiple buttons. When you press them the variable &quot;poeng&quot; changes. In the end there is a question asking &quot;are you done?&quot; then there is a button that says Yes!. Then a picture is supposed to pop up. I tried pressing the button that gives 200 points and above but nothing happens. The weird part is that it worked earlier but not anymore.</p>
  <p>Could anyone pls help me? This is for school and I am really stressed out as to why it is not working.</p>
  <ul>
  <li>Caroline 12</li>
  </ul>