I'm looking for alternatives to the following for creating a JavaScript array with values ranging from 1 to N, where N is only known at
runtime.
var foo = [];
for (var i = 1; i <= N; i++) {
foo.push(i);
}
There should be a way to do this without the loop, in my opinion.