finished javascript anagram submission