Repository navigation
Manchester | 26-ITP-Sep | Precious Moses | Sprint 2 | Book-Library - #605
moses77-boop wants to merge 34 commits into
Conversation
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.
|
Thank you for the feedback @cjyuan. |
| </form> | ||
| </div> | ||
| <div id="message" class="alert alert-warning" role="status" hidden></div> | ||
| <table class="table" id="display"> |
There was a problem hiding this comment.
Thank you for the feedback!
I have fixed it.
| const myLibrary = [ | ||
| new Book("Robinson Crusoe", "Daniel Defoe", "252", true), | ||
| new Book("The Old Man and the Sea", "Ernest Hemingway", "127", true), | ||
| ]; |
There was a problem hiding this comment.
Change is optional but you should use AI to explore:
Trade-off between initialise storage using a separate populateStorage() function and initializing storage directly with object literals. (In the context of JS)
There was a problem hiding this comment.
Thank you for the feedback and guidance!
I have kept a direct initialisation because the starter data is fixed, which means the array is never empty before render() runs. A separate function would be better if the data came from localStorage or needed resetting.
| const bookFormE1 = document.getElementById("book-form"); | ||
| const bookListE1 = document.getElementById("book-list"); | ||
| const messageE1 = document.getElementById("message"); |
There was a problem hiding this comment.
The suffix is suppose to be the first two letters of the word "element" ('E' and lowercase 'L') and not ('E' and digit one).
There was a problem hiding this comment.
Thank you for the feedback!
I have refactored my code.
Self checklist
Task code
CYF-1122
Changelist
In this PR, I debugged a Book Library application.