code: function union(x, y) {
          var obj = {};
          for (var i = 0; i < x.length; i++)
              obj[x[i]] = x[i];
          for (i = 0; i < y.length; i++)
              obj[y[i]] = y[i];
          var res = [];
          for (var k in obj) {
              if (obj.hasOwnProperty(k))
                  res.push(obj[k]);
          }
          return res;
      }
docs: Merge two arrays, keeping only unique elements.