title: javascript adding to beginning and end of innerhtml in a loop
body: <p>I have a setInterval and each time through the loop I want to add something to the beginning and end of the text in a div. Lets say I want to add the letter "x".  I only know how to add to the end like this...</p>
  
  <pre><code>t=setInterval(function(){
  document.getElementById('test').innerHTML +='x'
  },1000)
  </code></pre>
  
  <p>Lets say the loop runs 10 times before I clear the interval, my text would look like,</p>
  
  <p>My Textxxxxxxxxxx</p>
  
  <p>I want it to look like</p>
  
  <p>xxxxxxxxxxMy Textxxxxxxxxxx</p>