JavaScript
Create range of numbers in an Array

by Benny Neugebauer

// [1, 2, 3, 4, 5, 6, 7]
const solution = Array(7).fill(null).map((value, key) => key + 1);

// [0, 1, 2, 3, 4, 5, 6, 7]
const solution = [...Array(7).keys()];