Sometimes, the elegant implementation is just a function. Not a method. Not a class. Not a framework. Just a function.
- John Fucking Carmack
const range = (start, end) => {
const result = [];
for(let i = start; i <= end; i ++) {
result.push(i)
}
return result
}const range = (start, end) => {
const result = [];
for(let i = start; i <= end; i ++) {
result.push(i)
}
return result
}