About the Portfolio Project: Mixed Messages category

Hi there, the link to my repo is here Mixed Messages repo and is open to collaboration from others. Reply with your github username and ill add you as a collaborator.

Initially I found this difficult. I am okay with the basic concepts of JavaScript. ie. loops, objects, arrays, methods etc. However after reviewing the example from codecademy, I am lacking in creativity.

Also, I found it hard to get somebody to collaborate with me, so I ended up doing this solo.

Excellent implementation! I think codecademy need to review the formatting of Codebytes though. It’s a little hard to navigate the code.

1 Like

Nice work on this, and thanks for sharing. Definitely good for a laugh to see your prediction

Just a question: I’m curious why you didn’t use quotes [declared on line 20] rather than repeating your random generated quote (i.e. using ${quotes3[randomNo(quotes3)} ) when logging your result in the if/if-else/else statement.

I was able to do this relatively quickly with my own understanding of the project, but in reviewing the code, noticed I may have misunderstood the tasks a bit. So, I tried re-producing the code using arrays as a 2nd version, which I found tricky to wrap my head around, but eventually got there.

Thank you, i used VS code but for some reason the vertical guidelines are still there when i copied the code. May be that is why they are a little hard to read.

Thank you for your feedback :smiley:
When I did the if/else statement first I was doing like this:

if (quotes1[randomNo(quotes1)] > 28 && quotes2[randomNo(quotes2)] === ‘February’) {
console.log(On ${quotes1[randomNo(quotes1)]} of ${quotes2[randomNo(quotes2)]} ${year} you will ${quotes3[randomNo(quotes3)]}.)

So I realized that the condition inside the if (quotes1[randomNo(quotes1)] > 28) was generating a random number and if the condition was true the console.log(`On ${quotes1[randomNo(quotes1)]} was generating another number, and that was not good, because I needed the same number that was compared inside the if statement.
After I decided to store them into a variable to have the same value for the if condition and the console.log.
But the ${quotes3[randomNo(quotes3)} was not inside the if condition, and didn’t need to use the variable that was stored in, that’s why I didn’t used it.
I hope you understand what I’m trying to say. :sweat_smile:

Hi! The name’s Camille

Here’s my entry for the mixed message project:

The experience was generally fun. I created just a positive vibes fortune cookie program. It was overall fun problem solving. I ended up writing short concise code that’s content wise expandable. Took about 1 hour.

Added in some HTML so if you download it and refresh the browser it should change! Have fun!`

Appreciate any suggestions for improvements or if there’s any concerns!