Ad
Code
Diff
  • function generateInterval(start, stop, step) {
      const arr = [];
      let value = start;
      for (let index = 0; index <= (stop - start) / step; index++) {
          arr.push(value);
          value += step;
      }
      return arr;
    }