Inverts the items of an Array.
Syntax
Parameters
subject
- The Array to invert.
Result
subject
as item keys, and the corresponding keys as values. Duplicate values will replace one another. Only item values that are valid keys will be inverted.
Returns subject
with item keys and values exchanged.