title: Javascript calculator simple clear feature not working
body: <p>I am trying to build a simple calculator with Javascript and Im having issues when clearing display content. </p>
  
  <p>Can someone please have a look at my code and let me know why it is not working.</p>
  
  <p>Why won't setting the display value to an empty string work. What am I doing wrong? Tank you guys.</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 testing(button){
    var x = button.value;
    document.getElementById("display").innerHTML+=x;
  }
  
  function clear() {
    document.getElementById("display").innerHTML = "";
   }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
      &lt;input type="button" id="one" value="1" onClick="testing(this)"&gt;
      &lt;input type="button" id="one" value="2" onClick="testing(this)"&gt;
      &lt;input type="button" id="one" value="3" onClick="testing(this)"&gt;
      &lt;input type="button" id="clear" value="clear" onClick="clear()"&gt;
  
      &lt;h1 id="display"&gt;&lt;/h1&gt;
    &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>