Comment Comment by ReleaseCandidat Yes, but you could also use `fold`^H^H^H^H`reduce`.[1, 2, 3, 4, 5].reduce((acc, n) => n % 2 === 1 ? acc.push(2*n) : acc, []) parent ReleaseCandidat 4 years ago
[1, 2, 3, 4, 5].reduce((acc, n) => n % 2 === 1 ? acc.push(2*n) : acc, [])