Update anagrams_for.js

Optimization notes