I am really struggling to write the .invert() method in the Lodash library project. The invert method accepts an object as an argument, then it should loop through the key/value pairs of that object and then invert those key/value pairs and put them into an empty object within the same method. Essentially the new object that gets returned should have all the argument object’s keys as the value pairs, and the values as keys.
Any help much appreciated. I am lost.