Help with Lodash

I am currently on Step 25 of this project and I can’t understand why my code below doesn’t work after testing it?
Can anyone help please?

invert(object) { let invertedObject = {}; for (let key in object) { const originalValue = object[key] invertedObject = {originalValue : key} } return invertedObject; }

What does this line do? If you are unclear on what is happening, add a console.log() statement right after that line, and log invertedObject to the console.

Hi, thank you for your reply!
I’m currently in the bash terminal, how do I view the console within the codecademy editor?

You can open your web browser’s console.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.