In PHP, you can do...
range(1, 3); // Array(1, 2, 3) range(\"A\", \"C\"); // Array(\"A\", \"B\", \"C\")
That is, there is a function that l
My new favorite form (ES2015)
Array(10).fill(1).map((x, y) => x + y)
And if you need a function with a step param:
step
const range = (start, stop, step = 1) => Array(Math.ceil((stop - start) / step)).fill(start).map((x, y) => x + y * step)