code: function extend(prototype, attributes) {
      var object = {};
      Object.keys(prototype).forEach(function(key) {
        object[key] = prototype[key];
      });
      Object.keys(attributes).forEach(function(key) {
        object[key] = attributes[key];
      });
      return object;
    }
docs: for functions accepts an object as parameter copy the object and modify with attributes