generate array from a range js code example Example: create range array javascript [...Array(10).keys()] //=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]