title: How to add score to scoreboard?
body: <p>I am making a simple game, it is my first project with JavaScript. So You click the button, it gives You and Computer a math randoms, the winner is the one with bigger number. I created a scoreboard and want to add score whetever someone wins.  The problem is that it doesnt work, could You please give me some solutions?</p>
  
  <p>My HTML code:</p>
  
  <pre><code>   &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;link rel="stylesheet" type="text/css" href="style.css"&gt;
    &lt;title&gt;Random - the game&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;header&gt;
      &lt;center&gt;&lt;h1&gt;Random&lt;/h1&gt;
      &lt;h2&gt;The Game&lt;/h2&gt;&lt;/center&gt;&lt;/center&gt;
    &lt;/header&gt;
    &lt;div class = "scoreTable"&gt;
      &lt;span id="userScore"&gt;0&lt;/span&gt;
      &lt;span&gt;:&lt;/span&gt;
      &lt;span id="compScore"&gt;0&lt;/span&gt;
    &lt;/div&gt;
    &lt;div id="button"&gt;
      &lt;center&gt;&lt;img id="buttonOff" src="images/buttonOff.png" alt="przycisk" height="150px" width="150px" onmousedown="mouseDown()" onmouseup="mouseUp()" onclick="randomNumUser(); randomNumComp(); addScore()" /&gt;&lt;center&gt;
    &lt;/div&gt;
    &lt;center&gt;&lt;div id="message1"&gt;
      &lt;p&gt;Your number&lt;/p&gt;
      &lt;p class="number" id="userNumber"&gt;&lt;/p&gt;
    &lt;/div&gt;&lt;/center&gt;
    &lt;center&gt;&lt;div id="message2"&gt;
      &lt;p&gt;Computer number&lt;/p&gt;
      &lt;p class="number" id="computerNumber"&gt;&lt;/p&gt;
    &lt;/div&gt;&lt;/center&gt;
  &lt;script src="main.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My JS function for adding score:</p>
  
  <pre><code> function addScore() {
    let userResult = Number(document.getElementById("userNumber"));
    let compResult = Number(document.getElementById("computerNumber"));
    let userScore = Number(document.getElementById("userScore"));
    let computerScore = Number(document.getElementById("compScore"));
    if (userResult &gt; compResult) {
      userScore = userScore.innerHTML =+ 1;
    } else if (userResult &lt; compResult) {
      computerScore = computerScore.innerHTML =+ 1;
    }
  }
  </code></pre>