title: Issue in Loop calling
body: <p>I am working in JavaScript. I have an issue with loop calling.<br>
  My code is :</p>
  
  <p>Here is My Array </p>
  
  <pre><code>picArray = []; // Have tried with this too var picArray = new Array();
  </code></pre>
  
  <p>Here is My onClick function:</p>
  
  <pre><code>handler:function(){
      for(var i = 1; i&lt;picArray.length; i++) {
          alert(picArray[i]);
      }
  }
  </code></pre>
  
  <p>This is my loop to print the values from an array. 
  And my Array is:</p>
  
  <pre><code>var imgSource = document.getElementById(hellow).src;
  picArray[hellow] = imgSource;
  </code></pre>
  
  <p>This array is getting data on a condition. Handler function is called on click of a Button called Upload. The problem is When I press the Upload button it prints the correct values and remain pressed and print the values again. Is there any mistake in my code which compelling the loop to print values for 2 times?<br>
  Or anything else is doing this?</p>