Birmingham | 26-ITP-May | Gabriel Pawuoi | Sprint 2 | Book Library - #539
Birmingham | 26-ITP-May | Gabriel Pawuoi | Sprint 2 | Book Library#539KhotKeys wants to merge 5 commits into
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
Could you check if any of this general feedback can help you further improve your code?
https://github.com/CodeYourFuture/Module-Data-Flows/blob/general-review-feedback/debugging/book-library/feedback.md
Doing so can help me speed up the review process. Thanks.
cjyuan
left a comment
There was a problem hiding this comment.
Changes look good.
I only have a few suggestions.
| const pages = document.getElementById("pages"); | ||
| const check = document.getElementById("check"); | ||
| // 2. Attach event listener in JS via .addEventListener() instead of HTML inline | ||
| bookForm.addEventListener("submit", function (event) { |
There was a problem hiding this comment.
Could consider
- Define the "on submit" callback function as a named function.
- Place the "callback setup" statement together with all the code that run once on page load in a single function. For example, you could put it inside the page load callback or create a function named
init()orsetup()and call it once when the page loads.
Doing so could make it easier to locate and manage all the code that runs once when the app starts.
There was a problem hiding this comment.
Perfect, let me fall back and add those, thank you so much
Could consider
- Define the "on submit" callback function as a named function.
- Place the "callback setup" statement together with all the code that run once on page load in a single function. For example, you could put it inside the page load callback or create a function named
init()orsetup()and call it once when the page loads.Doing so could make it easier to locate and manage all the code that runs once when the app starts.
Perfect, let me fall back and add those, thank you so much
Learners, PR Template
Self checklist
Changelist
Fixed all bugs in the book library, specifically:
Questions
None.