DEV Community

Discussion on: Which Array Function When?

Collapse
 
erickjth profile image
Erick Torres • Edited

You are right, when accumulator stars in -1, it'll fail. When I said much simpler, I meant simpler in terms of writing code. :D

Thread Thread
 
billbarron profile image
Bill Barron

Protip: Don't try to be clever with your code:

simplethread.com/dont-be-clever/