title: print files name with "for" loop
body: <p>I would like to create a "for" loop that print the name of the files I upload.</p>
  
  <p>I don't know how many files it will be so I'm using loop.</p>
  
  <p>I know that i did something wrong. can you tell me what?</p>
  
  <pre><code>    &lt;form class="form-horizontal" action='#' method="post"  enctype="multipart/form-data"&gt;
  
  &lt;input type='file' name='file[]' class=' form-control file-field multi' maxlength='2' accept="image/jpg,image/png,image/jpeg,image/gif"  id="uploadFile0"/&gt;
  &lt;button class="btn btn-primary submit" &gt;SEND&lt;/button&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>$(document).on('submit','form',function(e) {
      e.preventDefault(); // stop the standard form submission, as you're using 
  
      var $form = $(this);
      var act = 'add';
  
  alert ($form.find('.file-field').length);
  
  for (var i = 0; i &lt;= $form.find('.file-field').length; i++) {
      alert ($form.find('.file-field')[i].name );
  }
  });
  </code></pre>