code: function (obj) {
        var inverted = {};
        for (var key in obj) {
          if (obj.hasOwnProperty(key)) {
            inverted[obj[key]] = key;
          }
        }
        return inverted;
      }
docs: returns a copy of the object where the keys have become the values and the values the keys.
  @param {Object} obj
  @return {Object}