I am supposed to write a program in JavaScript to find all the anagrams within a series of words provided. e.g.: "monk, konm, nkom, bbc, cbb, dell, ledl, llde" The output should be categorised into rows: 1. monk konm, nkom; 2. bbc cbb; 3. dell ledl, llde;
I already sorted them into alphabetical order i.e.: "kmno kmno bbc bbc dell dell" and put them into an array.
However I am stuck in comparing and finding the matching anagram within the array.
Any help will be greatly appreciated.