Three JS Solutions
\nvar groupAnagrams = function(strs) {\n    let obj = {};\n    for (let str of strs) {\n        let letters = str.split("").sort().join("");\n        obj[letter
```\nvar groupAnagrams = function(strs) {\n    let obj = {};\n    for (let str of strs) {\n        let letters = str.split("").sort().join("");\n        obj[letters] ? obj[letters].push(str) : obj[letters] = [str];\n    }\n    return Object.values(obj);\n};\n// Time Complexity: O(n*klog(k)) where n is the length of input array and k is the maximum length of a string in input array\n// Space Complexity: O(n)\n```\n\n```\nvar groupAnagrams = function(strs) {\n    let m = new Map();\n    for (let str of strs) {\n        let sorted = str.split("").sort().join("");\n        if (m.has(sorted)) m.set(sorted, [...m.get(sorted), str]);\n        else m.set(sorted, [str]);\n    }\n    return Array.from(m.values());\n};\n// Time Complexity: O(n*klog(k)) where n is the length of input array and k is the maximum length of a string in input array\n// Space Complexity: O(n)\n```\n\n```\nvar groupAnagrams = function(strs) {\n    let res = {};\n    for (let str of strs) {\n        let count = new Array(26).fill(0);\n        for (let char of str) count[char.charCodeAt()-97]++;\n        let key = count.join("#");\n        res[key] ? res[key].push(str) : res[key] = [str];\n    }\n    return Object.values(res);\n};\n// Time Complexity: O(n*k) where n is the size of input array and k is the maximum length of string in input array\n// Space Complexity: O(n)\n```
['JavaScript']