DEV Community

Discussion on: What Can Array Folding Do?

Collapse
asiby profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Abdoulaye Siby • Edited on

Dude. Please stop reinventing the wheel and do start reading the proper documentations.

Your "fold" is not a thing.

You are basically renaming and trying to hijack the credits from Array.prototype.reduce

And in case you didn't know it, the Array object also exposes methods like some(), every() that you called all(), join() etc.

Collapse
mebble profile image
Neil Syiemlieh Author

You seem very well-versed in JS array methods. You're right, these functions are already available in the standard API. But why does that have to stop anyone from experimenting for the sake of learning? Relax

Collapse
diekmrcoin profile image
diek

You are right, this is a very nice exercise to train.