title: javascript simple while loop not adding to innerHtml
body: <p>Ok so this is my dumb problem. im here learning and...ive been looking at this for a while and i dont understand. i have an array with some values that are fed via an object. like so:</p>
  
  <pre><code>function blogObj(name,date,user_entry){
      this.names = name;
      this.dates = date;
      this.blog_entry = user_entry;
  
      this.propsComb = this.names + this.dates + this.blog_entry;
  }
  
  var blogRun = [
          new blogObj("name ", "something ", "something "),
          new blogObj("name ", "something ", "something "),
          new blogObj("name ", "something ", "something "),
          new blogObj("name ", "something ", "something "),
          new blogObj("name ", "something ", "something "),
  
  
  ];
  
  var i=0;
  var mssgs = "";
  </code></pre>
  
  <p>now when i loop through it like this with this doc.write to test:</p>
  
  <pre><code>function hmm(){
      while(i &lt; blogRun.length){ 
      mssgs = blogRun[i].propsComb + '&lt;br/&gt;';
      document.write(mssgs);
  
      i++;
      }
  }
  </code></pre>
  
  <p>i get all the values i need which are name something something x5 as per the loop and the values of the array. so essentially it works.</p>
  
  <p>now when i replace the <code>"document.write(mssgs)"</code> with</p>
  
  <pre><code>document.getElementById('showMore').innerHTML = mssgs;
  </code></pre>
  
  <p>making it this</p>
  
  <pre><code>function hmm(){
      while(i &lt; blogRun.length){ 
      mssgs = blogRun[i].propsComb + '&lt;br/&gt;';
      //document.write(mssgs);
      document.getElementById('showMore').innerHTML = mssgs;
      i++;
      }
  }
  </code></pre>
  
  <p>it only shows me the last value of the array. it doesnt loop for the rest of the arrays values.
  all im doing is replacing the .write with getElementById etc..</p>