function invertObject(obj) {
  const inverted = {};
  for (const key in obj) {
    if (Object.prototype.hasOwnProperty.call(obj, key)) {
      inverted[obj[key]] = key;
    }
  }
  return inverted;
}
returns a copy of the object where the keys have become the values and the values the keys.
@param {Object} obj
@return {Object}