Javascript Set and brute force
\n/**\n * @param {string[]} words\n * @return {number}\n */\nvar similarPairs = function(words) {\n    const dist = words.map((word)=>{\n        return [...new 
```\n/**\n * @param {string[]} words\n * @return {number}\n */\nvar similarPairs = function(words) {\n    const dist = words.map((word)=>{\n        return [...new Set(word)].sort().join(\'\')\n    })   \n    let sum = 0\n    const n = dist.length\n\t\n    for (let i = 0; i < n; i++) {\n        for (let j = i + 1; j < n; j++) {\n            if (dist[i] === dist[j]) sum++\n        }\n    }\n    \n    return sum\n};\n```
['JavaScript']