Random quote machine: Any advice, feedback, ways to improve code, style?

Hello Campers!! Any feedback on my attempt to code the random-quote-machine?? It’s my attempt of not using any css and or js frameworks!!! I learned flexbox, javascript, css-transitions, along the way, it’s so fun!! If you have some advice, like if have a dirty code, or bad way of naming css classes, or i didn’t use flexbox that good, fill me in!! I’m willing to learn! :slight_smile:

I hope someday I can help others too in feedback and advice!!

Happy Coding!!

codepen link: https://codepen.io/jcunanan05/full/yKaoRm/

Great work !
Luv the changing background :slight_smile:

1 Like
1 Like

I think he meant to say not using any css frameworks or javascript frameworks. I’m not sure what the correct grammar for that is. But the commas make it confusing

1 Like

Thank you for your feedback Xiija! What terms or concepts of designs do you think I can tackle (or search the internet) and learn next to improve my css or styling? I saw one of your codepen loader it is good!

Sorry for the confusion! I’ve edited it as css or js frameworks. :slight_smile: Anyways, what improvements or concepts do you see I need to improve on my code?

1 Like

Thanks for this concept, Eddie! Hmm so I wrap the whole thing in an object or make a class in it of some sort?

Thank you Randell for such wonderful insights! I really appreciate your time reviewing how I code! :slight_smile:

yeah for #1 You’re right I did an unnecessary function. changeBackgroundColor() is readable code enough

for #2 yeah im wrong. I thought when I pass a wrong string this will handle the error and return an empty string. But I’ve removed it.

and for the updateQuote() i put ifs so it wont override my default html text content with an empty string. Is that a good practice? or i put my default text at js file?

and for onreadystate thanks for pointing it out. i forgot the return statement at the end. haha it is a trick that i watch tutorials do in js so they wont use else statement

thank you so much for insights! having others review my code make me a better programmer :slight_smile: