Cape Town | 2026-ITP-Jan | Isaac Abodunrin | Sprint 2 | Data Flows: Book Library Project#424
Cape Town | 2026-ITP-Jan | Isaac Abodunrin | Sprint 2 | Data Flows: Book Library Project#424bytesandroses wants to merge 22 commits into
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
-
If your PR is ready to be reviewed, you need to add a "Needs Review" label.
-
Regardless, please 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.
|
Hi @cjyuan sorry I forgot to add the needs feed back label. I've gone ahead .and refactored the script meet the criteria described on the feedback link |
cjyuan
left a comment
There was a problem hiding this comment.
Code looks good. Well done.
| const titleInput = document.getElementById("title"); | ||
| const authorInput = document.getElementById("author"); | ||
| const pagesInput = document.getElementById("pages"); | ||
| const checkInput = document.getElementById("check"); |
There was a problem hiding this comment.
Common practice is to declare all shared variables/constants at the beginning of the file before function definition.
| submitForm.reset(); | ||
|
|
||
| render(); | ||
| }); |
There was a problem hiding this comment.
Could consider keeping all the "run on page load" code in one place (in the call back of window's onload event listener) as:
const submitForm = document.getElementById("bookForm"); // declare at the top
...
// function definition
function submit(e) {
...
}
window.addEventListener('load', () => {
submitForm.addEventListener("submit", submit);
populateStorage();
render();
});|
Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it. |
Self checklist
Changelist
Fixed bugs and syntax errors in the
script.jsfile, ensuring: