the goal is to create a function that takes a path to a folder, iterates through the folder and 3-5 layers of subfolders, and puts the paths of all files in those folders into an array. Ideally, this array could be made on the fly, so I don't have to preallocate a LOT of arrays at the start of my js code. That would be messy, not to mention limiting!
to show you how much I don't understand, here is a code snippet that of course doesn't work:
v = new Array();
the message "newone jones 2" just adds the value 2 to the array "v".