title: How to replace all the text in the text in a loop?
body: <p>Sorry for my english =)
  I need to replace some of the elements on a page. Here is my code:</p>
  
  <pre><code>var text1 = $('body').html().replace(/text1/, 'text11');
  var text2 = $('body').html().replace(/text2/, 'text22');
  var text3 = $('body').html().replace(/text3/, 'text33');
  array = [text1, text2, text3];
        for (var i = 0; i &lt; array.length; i++) {
          $('body').html(array[i])
        };
  </code></pre>
  
  <p>But to replace only the first and third, if you remove the third element array, first and second is changed. Please tell me how to do it. Thank you!</p>