It may not be the most eye perfect code however the perf are close to the reducer solution jsperf.com/longestwordjs/11
I would still go to with the reducer solution, but sometimes doing 'old' things works very nice
I also try with for loop / for of, I expected it to be way more faster than everything else but it didn't.
from jsperf.com/foreach-vs-reduce-vs-fo...
Learned something new regarding jsperf, thank you. 🙏
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
We're a place where coders share, stay up-to-date and grow their careers.
It may not be the most eye perfect code however the perf are close to the reducer solution jsperf.com/longestwordjs/11
I would still go to with the reducer solution, but sometimes doing 'old' things works very nice
I also try with for loop / for of, I expected it to be way more faster than everything else but it didn't.
from jsperf.com/foreach-vs-reduce-vs-fo...
Learned something new regarding jsperf, thank you. 🙏