PV
Size: a a a
PV
t
PV
t
L
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
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
}
t
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
}
t
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
}
t
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
}
L
В
В
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
}
МГ