-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
base: main
Are you sure you want to change the base?
Sheffield | 25-ITP-May | Hassan Osman | Quote generator App. #648
Conversation
There was a problem hiding this 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.
Sprint-3/quote-generator/quotes.js
Outdated
let newQuote; | ||
do { | ||
newQuote = pickFromArray(quotes); | ||
} while (newQuote === lastQuote && quotes.length > 1); |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
@@ -1,3 +1,17 @@ | |||
let lastQuote = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is unused.
Learners, PR Template
Self checklist
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.