title: An easy if-statement
body: <p>So there is probably a really easy solution to this, but I'm trying to get a message in a P when two players are inputted.. So far I've got this(some norwegian words there, sorry):</p>
  
  <p><code>var spillere = [];</code></p>
  
  <pre><code>function myFunction() {
  if(spillere.length &gt; 0) {
   document.getElementById("printAppear").innerHTML = '&lt;button onclick="Printresultat()"&gt;Print resultat&lt;/button&gt;';
   }
  if(spillere.length &lt; 2) {
      var player_navn = document.getElementById('navn').value;
      var player_poeng = document.getElementById('poeng').value;
      spillere.push([player_navn, parseFloat(player_poeng)]);
  
      spillere.sort(function(a,b){ 
          return a[1] - b[1];
      });
  
  
      document.getElementById("demo").innerHTML = "";
      for(i = 0; i &lt; spillere.length; i++) {
          document.getElementById("demo").innerHTML += (i+1) + ". " + spillere[i][0] + " - " + spillere[i][1] + " poeng&lt;br /&gt;"; 
      }
  
  }
  </code></pre>
  
  <p>So I'm basically just wanting to get a text where it says "Congratulations" and then the name of the player who won in this:</p>
  
  <pre><code>&lt;p id="vinner"&gt;&lt;/p&gt;
  </code></pre>
  
  <p>spillere=players and vinner=winner</p>
  
  <p>Hope you understand what I'm trying to do</p>