DEV Community

Discussion on: #7DaysJS: Even or Odd

Collapse
 
jenc profile image
Jen Chan

I used a filter for even and odd, then a reduce for both. Probably cost the browser more power eh?

Collapse
 
lautarolobo profile image
Lautaro Lobo

Probably. Usually, for loops are faster, but maybe with larger inputs reduce outworks a for loop...