Implement invert(obj)
Write invert(obj) that swaps keys and values: each value becomes a key (coerced to a string, as object keys always are), pointing back to its original key.
invert({ a: "x", b: "y" }); // { x: "a", y: "b" }If two keys share the same value, the later key (in Object.keys order) wins.