S
Size: a a a
S
НС
НС
S
F
НС
CM
function* range(current, end, step = 1) {вот, переделал на генератор. Куда проще выглядит
if(current && !end) {
end = current;
current = 0;
}
const isStepPositive = current < end;
if(!isStepPositive) {
step = -step
}
for(; (isStepPositive ? current < end : current > end); current = current + step)
yield current
}
S
НС
F
PV
S