code: function range(begin, end, interval = 1) {
    var a = [];
  
    for (let i = begin; i < (begin+end); i += interval) {
      a.push(i);
    }
  
    return a;
  }
docs: infinite range generator will run as fast as the data access allows.