MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/fo5eyt/array_reduce_explained_in_80_seconds/fldqiry/?context=3
r/learnjavascript • u/somewhat-funny • Mar 24 '20
25 comments sorted by
View all comments
10
big portion missing from this 'tutorial', reduce also has a third parameter (accumulative total, current item, current index)
2 u/Mises2Peaces Mar 24 '20 Do you current index a lot in reduce? 2 u/[deleted] Mar 24 '20 i dont 2 u/Mises2Peaces Mar 24 '20 Me neither. I'm wondering if I'm missing something useful. 1 u/[deleted] Mar 24 '20 Well check out mdn reduce so you'll see when it would be useful to use the index.i think I've needed to use it once but that was for some problem on codewars
2
Do you current index a lot in reduce?
2 u/[deleted] Mar 24 '20 i dont 2 u/Mises2Peaces Mar 24 '20 Me neither. I'm wondering if I'm missing something useful. 1 u/[deleted] Mar 24 '20 Well check out mdn reduce so you'll see when it would be useful to use the index.i think I've needed to use it once but that was for some problem on codewars
i dont
2 u/Mises2Peaces Mar 24 '20 Me neither. I'm wondering if I'm missing something useful. 1 u/[deleted] Mar 24 '20 Well check out mdn reduce so you'll see when it would be useful to use the index.i think I've needed to use it once but that was for some problem on codewars
Me neither. I'm wondering if I'm missing something useful.
1 u/[deleted] Mar 24 '20 Well check out mdn reduce so you'll see when it would be useful to use the index.i think I've needed to use it once but that was for some problem on codewars
1
Well check out mdn reduce so you'll see when it would be useful to use the index.
i think I've needed to use it once but that was for some problem on codewars
10
u/Abiv23 Mar 24 '20
big portion missing from this 'tutorial', reduce also has a third parameter (accumulative total, current item, current index)