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