Skip to content

Sheffield | 25-ITP-May | Hassan Osman | Quote generator App. #648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

HassanOHOsman
Copy link

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

This PR adds functionality to display a random quote and its author on page load.
Ensures a new, different quote is shown each time the 'New Quote' button is clicked.

Questions

Ask any questions you have for your reviewer.

@HassanOHOsman HassanOHOsman added Needs Review Participant to add when requesting review 📅 Sprint 3 Assigned during Sprint 3 of this module labels Jul 18, 2025
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should respect instructions like DO NOT EDIT BELOW HERE; it is usually there for a reason. If you are curious about why, you can ask ChatGPT Why should programmers respect "DO NOT EDIT BELOW HERE" instruction in a file?

Note: You don't have to move your code for this. I just want to raise your awareness.

let newQuote;
do {
newQuote = pickFromArray(quotes);
} while (newQuote === lastQuote && quotes.length > 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice consideration but this condition is always false.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified my code and just got rid of it altogether.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review labels Jul 19, 2025
@HassanOHOsman HassanOHOsman added Needs Review Participant to add when requesting review and removed Reviewed Volunteer to add when completing a review labels Jul 19, 2025
@@ -1,3 +1,17 @@
let lastQuote = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is unused.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and review comments have been addressed and removed Needs Review Participant to add when requesting review labels Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Volunteer to add when work is complete and review comments have been addressed 📅 Sprint 3 Assigned during Sprint 3 of this module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants