JavaScript Slow but easy solution
\n```    \nlet set = [...new Set(nums)]\nif(set.length === 1) return 0\nlet max = set[0]^set[1]\nfor(let i = 0;i<set.length;i++){\n\tfor(let j=i+1;j<set.length;
![image](https://assets.leetcode.com/users/images/9867eb02-9c67-424d-9850-d4a92bddd499_1643295179.0336132.png)\n```    \nlet set = [...new Set(nums)]\nif(set.length === 1) return 0\nlet max = set[0]^set[1]\nfor(let i = 0;i<set.length;i++){\n\tfor(let j=i+1;j<set.length;j++){\n\t   max = Math.max(set[i]^set[j], max)\n\t}   \n}\nreturn max
['JavaScript']