title: How to make a javascript slideshow using for loop
body: <p>I want to make a javascript slideshow using a for loop
  Javascript code</p>
  
  <pre><code>        var Image_slide = new Array("img1.jpg", "img2.jpg", "img3.jpg");// image container
      var Img_Lenght = Image_slide.length; // container length - 1
  
      function slide(){
          for (var i = 0; i &lt; Img_Lenght; i++) {
  
          Image_slide[i];
  
          };
          document.slideshow.src = Image_slide[i];
      }
      function auto(){
          setInterval("slide()", 1000);
      }
  
      window.onload = auto;
  </code></pre>
  
  <p>html code</p>
  
  <pre><code>&lt;img src="img1.jpg" name="slideshow"&gt;
  </code></pre>
  
  <p>i can't figure out what is the problem of this code it just run img3 continuously without looping img1 and it also skip img2 from the loop</p>