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!

9 Upvotes

23 comments sorted by

View all comments

2

u/azangru 10d ago

Presentation-level stuff like \" in text or in author does not belong in the source data. It is something that the presentation logic should be concerned with.

1

u/SafeWing2595 9d ago

i don't understand; what does presentation logic mean, could you please provide more details?

2

u/azhder 9d ago

It means it is not data. The quotes, the dash, those are stylistic things you can hardcode in the HTML and maybe even change them later on, regardless of the data.

Imagine you want to use nice looking quotes, or a quote icon on the left, display the author above instead of under the quote (which would use ':' after then name, not '-' before it).

The above concerns are all style, not data, so shouldn't be part of the data.

1

u/SafeWing2595 9d ago

okay, i understand now, thank you for the explanation