💡JavaScript Solution Hash Table & Sort
The Idea - Hash Table\n1. Build a character count hash table on s\n2. Compare the hash table with t\njavascript\nvar isAnagramHashTable = function(s, t) {\n    
#### The Idea - Hash Table\n1. Build a character count hash table on s\n2. Compare the hash table with t\n``` javascript\nvar isAnagramHashTable = function(s, t) {\n    let hash = {};\n    for (let char of s) {\n        hash[char] = hash[char]+1||1;\n    }\n    for (let char of t) {\n        if (!hash[char]) return false;\n        hash[char]--;\n        if (hash[char] == 0) delete hash[char];\n    }\n    return [...Object.keys(hash)].length==0\n}\n```\n#### The Idea - Sort\n1. Sort both input and compare\n``` javascript\nvar isAnagramSort = function(s, t) {\n    return s.split(\'\').sort().join(\'\') == t.split(\'\').sort().join(\'\');\n};\n```
['JavaScript']