Complete javascript anagram.