Seems similar to the .reduce() function in javascript. Although I don't know enough about .reduce() to know if your example would be attainable using it alone. Either way, good job on making a function and sharing it with us 🙂
Yes. It is exactly what reduce is good for. I'm trying an experiment in this post. Just to see what people think. Like what if it had a another name? Would they still hate it, to do the point of making a linting rule that won't let you ship code with it?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Seems similar to the
.reduce()
function in javascript. Although I don't know enough about .reduce() to know if your example would be attainable using it alone. Either way, good job on making a function and sharing it with us 🙂Yes. It is exactly what
reduce
is good for. I'm trying an experiment in this post. Just to see what people think. Like what if it had a another name? Would they still hate it, to do the point of making a linting rule that won't let you ship code with it?