DEV Community

Discussion on: Understand array methods by implementing them — all of them

Collapse
 
wintvelt profile image
wintvelt

Nice! Thanks for the list. The .find and .flat was really valuable to replace my old fashioned ugly .indexOf or .filter()[0] versions.
And I have been bitten more than once with the ugly fact that .sort() mutates the array it operates on (as opposed to .map and .filter, which return a new array).