ппц каша const sumOfOdds = (num) => { if (num < 0) return 0; const iter = (counter, accumulator) => { if (counter < 0) return accumulator; if (counter % 2 !== 0) accumulator += counter; return iter(counter--, accumulator); }; return iter(num, 0); };
Обсуждают сегодня