Mixed Messages - Motivational Quotations

Hi Everyone! today I have completed my Mixed-Messages Portfolio project and It was really fun to getting around some new ideas to solve that task. Here is what I have done. It would be a honor for me if you give me some feedback like how I did it? What are other useful approaches to solve it?.

Happy Coding…!

Looking good! A couple of things:

1- It might be a good idea to write a better explanation of why your code works the way it does. It looks like you take a random “message” from the Quotations list and pair it together with a random “author” from the Author list. Why are they both random? Doesn’t each quote have its own author?

2- For your for loop you do:

 for (let msg in messages)

This for loop is giving you Quotations in the first iteration and Author in the second iteration. You could replace it by using:

Object.keys(messages); // returns ['Quotations','Author']

Good job :+1:

1 Like

I would change the variable names, they don’t really relate to the values, e.g. messages isn’t really the messages it contains the parts that combine to make a message.

1 Like

Yeah I got you, thank you so much :slightly_smiling_face:

Yeah you’re right. I’ll change them and keep in mind next time. Thanks :slightly_smiling_face: