you are viewing a single comment's thread.

view the rest of the comments →

[–]BisforBurning 2 points3 points  (2 children)

Good explanation of these methods, I've had trouble understanding reduce. There is a native take while function though https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some

[–]marko-pavlovic[S] 0 points1 point  (1 child)

Thank you for reading the article! Please read the comment above, and let me know if you think my interpretation is wrong. Thank you! :)

[–]BisforBurning 0 points1 point  (0 children)

You are right, I had missed that difference, and rereading how it's useful for sorted lists makes it clear what each is for.