-
-
Notifications
You must be signed in to change notification settings - Fork 155
WM | 25-ITP-May | Abdullah Saleh | Sprint 3 | Quote Generator #688
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?
WM | 25-ITP-May | Abdullah Saleh | Sprint 3 | Quote Generator #688
Conversation
Note: The first 6 commits were pushed accidentally and are not part of the intended changes for this pull request. Unfortunately, I couldn't remove them from the PR history. |
Sprint-3/quote-generator/quotes.js
Outdated
const author = document.querySelector("#author"); | ||
|
||
// Attach a click event listener to the "New Quote" button | ||
const newClick = document.querySelector(".btn").addEventListener("click", () => { |
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.
-
What's the use of variable
newClick
? -
CSS
class
can be shared by multiple elements. It is better assignid
attribute to uniquely identify an element in HTML.
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.
Thanks for the suggestion! I've updated the button to use an id instead of a class for more precise selection and to avoid potential conflicts. Also, I removed the unnecessary newClick
button
Changes look good. Well done! |
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.