Skip to content

London | 26-ITP-January | Mouawia Elkhalifa | Sprint 2 | Book Library#414

Open
MouawiaElkhalifa wants to merge 2 commits intoCodeYourFuture:mainfrom
MouawiaElkhalifa:feature/book-library
Open

London | 26-ITP-January | Mouawia Elkhalifa | Sprint 2 | Book Library#414
MouawiaElkhalifa wants to merge 2 commits intoCodeYourFuture:mainfrom
MouawiaElkhalifa:feature/book-library

Conversation

@MouawiaElkhalifa
Copy link
Copy Markdown

Learners, PR Template
Self checklist

[x] I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title

[x] My changes meet the requirements of the task

[x] I have tested my changes

[x] My changes follow the style guide

Changelist
In this PR, I have completed the Book Library debugging exercise.

@github-actions

This comment has been minimized.

@MouawiaElkhalifa MouawiaElkhalifa added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 9, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 9, 2026
@MouawiaElkhalifa MouawiaElkhalifa added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 9, 2026
Copy link
Copy Markdown
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Apr 10, 2026
@MouawiaElkhalifa MouawiaElkhalifa added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Apr 10, 2026
@MouawiaElkhalifa
Copy link
Copy Markdown
Author

Refactored the script to ensure proper data types, improved variable naming, and resolved the accessibility issues

@MouawiaElkhalifa MouawiaElkhalifa added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 10, 2026
@@ -1,47 +1,23 @@
let myLibrary = [];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could consider declaring myLibrary using const, since it is not going to be reassigned another value.

Comment on lines +32 to 37
const pagesValue = parseInt(pagesInput.value);

if (!titleValue || !authorValue || isNaN(pagesValue)) {
alert("Please fill all fields with valid information!");
return;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What range of whole numbers are considered valid?

deleteBtn.addEventListener("click", () => {
myLibrary.splice(index, 1);
render();
setTimeout(() => alert(`Deleted: ${book.title}`), 100);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice touch to prevent the alert dialog box from blocking the UI update.

@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 10, 2026
@cjyuan
Copy link
Copy Markdown
Contributor

cjyuan commented Apr 10, 2026

Note: In the PR description, the checkboxes and the "Changelist" header are not yet properly encoded in Markdown syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants