how to make array while looping another array in javascript
<pre><code>for (var i = 0; i &lt; input.files.length; ++i) {
     name = name.push(input.files[i].name)
}
</code></pre>

<p>I want to get the name of the files and put them in a array so I can post them to a php file to upload. Please help.</p>

<p>The variable name is the array I want to post.</p>

<p>is there a loop in javascript like foreach in php</p>
