title: Is there a way to use .innerHTML multiple times?
body: <p>I would like to write two variable values into a div container (with id myDiv) using innerHTML. My Div container is only showing the second value.</p>
  
  <pre><code>&lt;button type="button" onclick="myFunction()"&gt;Click me&lt;/button&gt;
  &lt;input type="text" id="First" name="firstname"&gt;
  &lt;input type="text" id="Last" name="lastname"&gt;
  
  &lt;div id="myDiv"&gt;&lt;/div&gt;
  &lt;script&gt;
  function myFunction() {
      var x = document.getElementById("John").value;
      var y = document.getElementById("Mail").value;
      document.getElementById("myDub").innerHTML=x;
      document.getElementById("myDub").innerHTML=y;
  }&lt;/script&gt;
  </code></pre>