title: Javascript - Add images
body: <p>I have some images (image1, image2, image3 ..etc. ) and I will add those images to each cell seperately. I found a code to insert the images. </p>
  
  <pre><code>document.getElementById("cell1").innerHTML = "&lt;img src='image1.png'&gt;";
  </code></pre>
  
  <p>Now, Can someone help me to put above code in a  loop in order to avoid to write same code for each image ?
  I have tried below code but it does not work. Probably there is a problem with quotes. Or is there a better way to insert multiple images to each cells ?</p>
  
  <pre><code>for (x=0; x=10; x++) {
  document.getElementById("'cell" + x + "'").innerHTML = "&lt;img src=" + "' + x + ".png'&gt;"; }
  </code></pre>