code: function mergeObjects(a, b) {
      var r = { };
      for (var k in a)
          r[k] = a[k];
      for (var k in b)
          r[k] = b[k];
      return r;
  }
docs: Creates a new object containing the properties of the first object and the second object. If any value has the same key in both values, the second object overrides the first.