code: function invert(obj) {
      let result = {};
      let keys = Object.keys(obj);
      for (let i = 0, length = keys.length; i < length; i++) {
        result[obj[keys[i]]] = keys[i];
      }
      return result;
    }
docs: Invert the keys and values of an object. The values must be serializable.