title: How can I increment a value inside HTML?
body: <p>I'm completely new to JavaScript. I'm trying to increment a variable inside the HTML, it's not working.  Is my syntax wrong?</p>
  
  <pre><code>&lt;script&gt;
  function rps() {
  computerScore.value++;
  computerScore.innerHTML = computerScore.value;
  }
   &lt;/script&gt;   
  &lt;html&gt;
  &lt;b&gt;computer score:&lt;/b&gt;&lt;p id="computerScore" value="0"&gt;-&lt;/p&gt;
  &lt;button type="button" onclick="rps()"&gt;Go&lt;/button&gt;&lt;br&gt;
  &lt;/html&gt;
  </code></pre>