Randomly select file from folder in JS without an array
<p>I have this code to randomly grab a file from a folder path, and load it via jQuery:</p>

<pre><code>var path = '/path-to-files/',
files = ['1.php', '2.php', '3.php', '4.php', '5.php', '6.php'],
i = Math.floor(Math.random()*files.length);
var url = (path+files[i]);
$("#my-div").load(url);
</code></pre>

<p>It's great, it works well. But I would prefer a method to randomly grab files from the <code>path</code> without building an array. Is that possible?</p>
