Thank you Wojciech. I love your method. It's very clever and coincise. Works perfectly too.
Do you mind explaining what is going on in the reduce() function probably by commenting the code?
I thought of reducing array of anagrams to an object which keys will be initial words and values arrays of anagrams from these words.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.