title: How to add to the content of a div without deleting it's original content using javascript
body: <p>I was making a quiz site and when I came to the point when I was making a button to show you the correct answer of your mistake I used document.getElementById but it always erased the rest of the answers that was written by the same method.</p>
  
  <p>here is a snippet of my javascript code    </p>
  
  <pre><code>if (mistakes &gt; 0) {
    if (document.getElementById('wrongAnswer1').checked === true || 
        document.getElementById('wrongAnswer2').checked === true) {
          document.getElementById('mistakesDiv').innerHTML =
            document.getElementById('mistakesDiv').innerHTML + 
            "&lt;br&gt;" + 
            "question 1's correct answer is" + 
            document.getElementById('correctAnswer1').value;
     }
  }
  </code></pre>