Javascript
\n/**\n * @param {string[]} strs\n * @return {string[][]}\n */\nvar groupAnagrams = function(strs) {  \n    const m = new Map();\n    \n    for(const s of strs)
```\n/**\n * @param {string[]} strs\n * @return {string[][]}\n */\nvar groupAnagrams = function(strs) {  \n    const m = new Map();\n    \n    for(const s of strs) {\n        const keys = Array(26).fill(0);\n        for(const c of s){\n            ++keys[c.charCodeAt(0) - 97]\n        }\n        const key = keys.join("#");\n        let val = [];\n        if(m.has(key)) {\n            val = m.get(key)\n        }  \n        val.push(s);\n        m.set(key, val);\n    }\n \n    return Array.from(m.values());\n};\n```
[]