title: Basic Javascript: Cannot output result on html
body: <p>I'm trying to learn Javascript by making a simple calculator, but somehow the result of the calculation doesn't show up. I'm wondering what's wrong with my code. I've tried many ways to understand the error, but I still don't know why. The calculation works just fine in the console, it's just the output that seems to have the problem. </p>
  
  <p>Can somebody help me?</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>function calc(){
  
  
    var a = parseInt(document.querySelector("#value1").value);
    var b = parseInt(document.querySelector("#value2").value);
    var op = document.querySelector("#operator").value;
    var calculate;
  
  if (op == "add") {
    calculate = a + b;
  } else if (op == "min"){
    calculate = a - b;
  }else if (op == "div"){
    calculate = a / b;
  }else if (op == "mul"){
    calculate = a * b;
  }
  
  console.log(calculate);
  document.querySelector("#result").innerHtml = calculate;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script src="js/main.js"&gt;
      &lt;/script&gt;
  
    &lt;/head&gt;
    &lt;body&gt;
      &lt;form&gt;
        Value 1: &lt;input type="text" name="" value="" id="value1"&gt;
        Value 2: &lt;input id="value2" type="text" name="" value=""&gt;
        Operator:
        &lt;select id="operator" class="" name=""&gt;
          &lt;option value="add"&gt;Add&lt;/option&gt;
          &lt;option value="min"&gt;Min&lt;/option&gt;
          &lt;option value="div"&gt;Div&lt;/option&gt;
          &lt;option value="mul"&gt;Multiply&lt;/option&gt;
        &lt;/select&gt;
        &lt;button type="button" onclick="calc()" name="button"&gt;Calculate&lt;/button&gt;
      &lt;/form&gt;
  
      &lt;div id="result"&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>