Skip to content

Manchester | 26-ITP-Jan | Mehroz Munir | Sprint 2| Book Library#433

Open
MehrozMunir wants to merge 1 commit intoCodeYourFuture:mainfrom
MehrozMunir:feature/book-library
Open

Manchester | 26-ITP-Jan | Mehroz Munir | Sprint 2| Book Library#433
MehrozMunir wants to merge 1 commit intoCodeYourFuture:mainfrom
MehrozMunir:feature/book-library

Conversation

@MehrozMunir
Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

I have tried to make the book library website more interactive, added validation for the input fields, and resolved the bugs in rendering and adding data.

@MehrozMunir MehrozMunir added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Data-Flows The name of the module. labels Apr 13, 2026
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.

According to https://validator.w3.org/, there is an error in your index.html. Can you fix it?

@@ -1,14 +1,13 @@
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 it using const.

const book = new Book(
titleInput.value,
authorInput.value,
pagesInput.value,
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.

.value is a string, and a user can enter a value such as "1.4e2" (a numerical value equals to 140) in the input field.

readStatus = "No";
}
changeBut.innerText = readStatus;
myLibrary[i].check ? (readStatus = "Yes") : (readStatus = "No");
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.

Normally way to use ? : is:

readStatus = myLibrary[i].check ? "Yes" : "No";

condition ? v1 : v2 is an expression. It evaluates to v1 if condition is true, and to v2 if condition is false.

@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 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Data-Flows The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants