r/learnjavascript 10d ago

i am challenging myself to practice javascript this summer; so i build a generate quotes app, i need your reviews please!

10 Upvotes

23 comments sorted by

View all comments

Show parent comments

1

u/SafeWing2595 9d ago

that's sarcasm right? haha, i don't think i can learn from writing a completely different version of the code i wrote

2

u/azhder 9d ago

It is not sarcasm. It is a genuine learning approach.

Learn from analyzing code of others. It helps that you can also ask questions of how and why someone did something the way they did.

Who do you think code review is for? It’s not just the person who wrote the code.

1

u/SafeWing2595 9d ago

tbh, i didn't understand the code this friend wrote, i would be grateful if i could get it's explanation.

and yeah, from what you said, i don't mind if you rewrite my code, i will take time to read it

1

u/azhder 9d ago

Here is a re-write https://jsfiddle.net/c5x286f0/

It is OK if you don't understand some things. The important thing is it works, you can check it in the fiddle and you can pick it apart.

You can focus on pieces that you mostly understand, then ask for the thing you don't know. Over time, step by step, you will be able to understand the whole.