We're a place where coders share, stay up-to-date and grow their careers.
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.
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
You are right, this is a very nice exercise to train.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
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.
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
You are right, this is a very nice exercise to train.