Массивы и коллекции / Итераторы

functioncounter(low, high, step) {
    let current = low;
    while (current <= high) {
        yield current;
        current += step;
    }
}

for (let c of counter(392)) {
    console.log(c);
}
//printed 3, 5, 7, 9