Glasgow | 26-ITP-May | Niangh Ciang | Sprint 2 | Book Library - #515
Glasgow | 26-ITP-May | Niangh Ciang | Sprint 2 | Book Library#515Niangh-Ciang wants to merge 19 commits into
Conversation
…layed on the page
cjyuan
left a comment
There was a problem hiding this comment.
Can 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.
…ang/Module-Data-Flows into book-library-debugging
|
I’ve gone through the general feedback and made the improvements. |
|
I have made improvements to my code. |
cjyuan
left a comment
There was a problem hiding this comment.
Changes look good. Well done.
| min="1" | ||
| step="1" |
There was a problem hiding this comment.
My bad. default step value is already 1. So even without explicitly setting step="1", the input element will only accept whole number.
| pages.value == null || | ||
| pages.value == "" | ||
| ) { | ||
| document.getElementById("submitBtn").addEventListener("click", submit); |
There was a problem hiding this comment.
Better practice to keep all the code that needs to be executed once on page load together. Doing so makes it easier to find out what the app does on page load.
| return; | ||
| } | ||
|
|
||
| if (!pagesValue || isNaN(pagesValue) || pagesValue <= 0) { |
There was a problem hiding this comment.
Could also replace the first two checks by !Number.isInteger(pagesvalue).
Self checklist
Changelist
Completed fixing all bugs in the Book Library project.