Javascript Union Find Solution
js\nvar findRedundantConnection = function(edges) {\n    let uf = {};\n    for(let edge of edges){\n        let u = edge[0];\n        let v = edge[1];\n        
```js\nvar findRedundantConnection = function(edges) {\n    let uf = {};\n    for(let edge of edges){\n        let u = edge[0];\n        let v = edge[1];\n        if(find(u) === find(v)){\n            return edge;\n        } else {\n            union(u, v);\n        }\n    }\n    \n    function union(a, b){\n        uf[find(a)] = uf[find(b)];\n    }\n    \n    function find(x){\n        if(!uf[x]) uf[x] = x;\n        if(uf[x] === x) return x;\n        return find(uf[x]);\n    }\n};\n```
['Union Find', 'JavaScript']