📅  最后修改于: 2022-03-11 15:01:51.402000             🧑  作者: Mango
function range(start, end, interval = 0) {
let arr = [];
interval = interval > 0 ? interval-1 : 0
for (let i = start; i < end; i++) {
arr.push(i)
i+=interval;
}
return arr
}
// example range(0 , 100 , 5)