Given two strings of equal length, write a function that determines if they are anagrams (that is, if one string can be rearranged to form the other string)
Sigiloso
Using JavaScript, I created a JSON structure that counts how many times each letter appears in the first string. Then I compared it to the second string; if a letter appeared that was already in the key-value map, I decremented the value of that letter. If all of the values are 0 at the end, and no new letters have appeared, it's an anagram.