Skip to content

London|ITP-Jan-2026 |Alexandru Pocovnicu | Sprint 2 | Book library - #410

Closed
alexandru-pocovnicu wants to merge 30 commits into
CodeYourFuture:mainfrom
alexandru-pocovnicu:book-library
Closed

London|ITP-Jan-2026 |Alexandru Pocovnicu | Sprint 2 | Book library #410
alexandru-pocovnicu wants to merge 30 commits into
CodeYourFuture:mainfrom
alexandru-pocovnicu:book-library

Conversation

@alexandru-pocovnicu

@alexandru-pocovnicu alexandru-pocovnicu commented Apr 6, 2026

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

debugged the code

@github-actions

This comment has been minimized.

4 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@alexandru-pocovnicu alexandru-pocovnicu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 6, 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 6, 2026
@alexandru-pocovnicu alexandru-pocovnicu changed the title London|26-ITP-January|Alexandru Pocovnicu|Sprint-2|Book library London|26-ITP-January|Alexandru Pocovnicu|Sprint 2|Book library Apr 6, 2026
@github-actions

This comment has been minimized.

@alexandru-pocovnicu alexandru-pocovnicu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 6, 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 6, 2026
@alexandru-pocovnicu alexandru-pocovnicu changed the title London|26-ITP-January|Alexandru Pocovnicu|Sprint 2|Book library London|ITP-Jan-2026 |Alexandru Pocovnicu | Sprint 2 | Book library Apr 6, 2026
@alexandru-pocovnicu alexandru-pocovnicu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 6, 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 6, 2026
@github-actions

This comment has been minimized.

@alexandru-pocovnicu alexandru-pocovnicu added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Apr 6, 2026
@alexandru-pocovnicu alexandru-pocovnicu added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Apr 17, 2026

@cjyuan cjyuan left a comment

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.

Changes look good. Just a few more suggestions.

Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment on lines 84 to +90
let readStatus = "";
if (myLibrary[i].check == false) {
readStatus = "Yes";
} else {
readStatus = "No";
} else {
readStatus = "Yes";
}
changeBut.innerText = readStatus;
changeButton.textContent = readStatus;

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.

This could be a good opportunity to practice using the ? : conditional operator. Can you rewrite the code on lines 84–90 as a single statement?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

@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 17, 2026
@alexandru-pocovnicu alexandru-pocovnicu added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Apr 17, 2026

@cjyuan cjyuan left a comment

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.

Changes look good.

changeBut.innerText = readStatus;

changeBut.addEventListener("click", function () {
myLibrary[i].check == false ? (readStatus = "No") : (readStatus = "Yes");

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.

expr1 ? expr2 : expr3 is an expression that evalutes to the value of either expr2 or expr3 depending
on the truthy value of expr1.

Normal use of ? : is

variable = expr1 ? expr2 : expr3;

instead of

expr1 ? (variable = expr2) : (variable = expr3);

Note: .check is a boolean value. You can just use its value directly without comparing it to true or false.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Apr 18, 2026
@illicitonion

Copy link
Copy Markdown
Member

Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it.

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

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants