showing results for - "javascript create an array of range between two numbers"
Anthony
19 Feb 2017
1function range(start, end) {
2const range = [...Array(max - min + 1).keys()].map(i => i + min);
3var result = range(9, 18); // [9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
4console.log(result);