title: Simple level system with xp, money, and levels
body: <p>I am trying to create a simple level system, but it somehow doesn't update the levels. Can anyone help me with this? (The money and xp works)</p>
  
  <pre><code>var money = 0;
  var xp = 0;
  var level = 1;
  
  window.onload = function() {
   document.getElementById("money").innerHTML = 'Money: ' + money;
   document.getElementById("xp").innerHTML = 'XP: ' + xp;
   document.getElementById("level").innerHTML = 'Current level: ' + level;
  }
  
  function giveExp(number){
   money = parseInt(money) + 50;
   xp = xp + 100;
  
   document.getElementById("money").innerHTML = 'Money: ' + money;
   document.getElementById("xp").innerHTML = 'XP: ' + xp;
  }
  
  
  if (xp &gt; 150 &amp;&amp; xp &lt; 450) {
   level = level + 1;
   document.getElementById("level").innerHTML = 'Current level: ' + level;
  }
  </code></pre>