Mixed Messages project review

Hi everyone!

Please review my project on mixed messages. :slight_smile:


Hi @rubyplayer14585! I love the messages, they’re very entertaining and clever. I like how you built an object with arrays to organize the starter, subject, etc.

There’s an opportunity to simplify the code by refactoring to remove the switch statement inside the generateMessage function. We can create an empty object with the same keys as the messages object. Then, it’s a one-liner to get the return values within the for...in loop.

I created a gist on GitHub with a working update to the file that you can review.

I’m still learning, so experts might have better feedback. Hope this is helpful!

1 Like

HI @ryanjensen!

Wow, that was really simplifying the message generation! Thank you for your suggestion, really appreciate it!

1 Like