I am a Software Engineer and Developer Advocate who loves sharing knowledge via writing, videos, mentorship, and working out. Please Subscribe: https://www.youtube.com/channel/UCcz5Bvr4kGHPFAjvnRhIQ4g
I am a Software Engineer and Developer Advocate who loves sharing knowledge via writing, videos, mentorship, and working out. Please Subscribe: https://www.youtube.com/channel/UCcz5Bvr4kGHPFAjvnRhIQ4g
Here's the reduce version for those who are wondering:
Edited, to clarify how the code works:
sentence.split(" ")
returns an array of words.reduce
on it.currentWord
).This is awesome, Aleksandr. Works perfectly. Can you walk us through the code?
Sure, edited to clarify
Thank you for the explanation. You are good.