title: Binding onclick event to sum two numbers doesn’t work
body: <p>I’m making a simple sum function. It’s not working properly. What is wrong?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let B = document.getElementById('bu');
  let input1 = parseInt(document.getElementById('qq').innerHTML);
  let input2 = parseInt(document.getElementById('qw').innerHTML);
  
  B.onclick = (a, b) =&gt; {
    if (a + b === 100 || a === 100 || b === 100) {
      alert('you did it');
    } else {
      alert('try again');
    }
  }
  B.onclick(input1, input2);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="but"&gt;
    &lt;input type="text" id="qq"&gt;
    &lt;input type="text" id="qw"&gt;
    &lt;button id="bu"&gt; check&lt;/button&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I put <code>100</code> in <code>input1</code> or <code>input2</code> or <code>input1 + input2 === 100</code>, I want to alert “you did it”, otherwise “try again”.</p>