Update anagrams.js

lose the error handling logic for conditional flow controls