title: adding two numbers with html/JS not working
body: <p>I have this extremely simple code for adding 2 numbers with JS and  just showing the result to the console but it's not working. I tried all day to figure out what's wrong but I really don't know...</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;title&gt;Failure&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;label for=&quot;value1&quot;&gt;Value1&lt;/label&gt;
      &lt;input type=&quot;number&quot; id=&quot;value1&quot; /&gt;
      &lt;label for=&quot;value2&quot;&gt;Value2&lt;/label&gt;
      &lt;input type=&quot;number&quot; id=&quot;value2&quot; /&gt;
      &lt;button id=&quot;btn&quot;&gt;Submit&lt;/button&gt;
      &lt;hr&gt;
      &lt;h2&gt;Result&lt;/h2&gt;
      &lt;p id=&quot;result&quot;&gt;&lt;/p&gt;
  
      &lt;script&gt;
          let a = document.getElementById(&quot;value1&quot;).value;
          let b = document.getElementById(&quot;value2&quot;).value;
          let result = document.getElementById(&quot;result&quot;);
          let button = document.getElementById(&quot;btn&quot;);
          function summing() {
              let sum = a + b;
              console.log(sum);
          }
          button.addEventListener(&quot;click&quot;, summing);
      &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>