Skip to content

London | 26-ITP-May | Tomislav Dukez | Sprint 3 | Stretch#1454

Open
tomdu3 wants to merge 13 commits into
CodeYourFuture:mainfrom
tomdu3:coursework/sprint-3/4-stretch
Open

London | 26-ITP-May | Tomislav Dukez | Sprint 3 | Stretch#1454
tomdu3 wants to merge 13 commits into
CodeYourFuture:mainfrom
tomdu3:coursework/sprint-3/4-stretch

Conversation

@tomdu3

@tomdu3 tomdu3 commented Jul 3, 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

Added tasks:

  1. find
  2. password validator
  3. card validator

@github-actions

This comment has been minimized.

@tomdu3 tomdu3 added 🏝️ Priority Stretch Do this once mandatory work is done Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Jul 3, 2026
@tomdu3 tomdu3 changed the title London | 26-ITP-May | Tomislav Dukez | Sprint 3 | Strech London | 26-ITP-May | Tomislav Dukez | Sprint 3 | Stretch Jul 3, 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 Jul 3, 2026
@tomdu3 tomdu3 added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 3, 2026
Comment on lines +2 to +5
// Check if the card number is a positive integer.
if (typeof cardNumber !== "number" || cardNumber < 0) {
return false;
}

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.

Note:

  • To check if a value is in integer, Number.isInteger() is better.

  • Credit card numbers typically have 16 digits, but not all 16-digit integers can be safely represented as a number in JS -- many numbers larger than Number.MAX_SAFE_INTEGER cannot be represented properly. For example, 9007199254740993. Normally, card numbers are represented as strings.

No change required.

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.

cool observation. thanks

Comment thread Sprint-3/4-stretch/find.js
Comment thread Sprint-3/4-stretch/password-validator.js Outdated
Comment thread Sprint-3/4-stretch/password-validator.js Outdated
Comment on lines +54 to +61
test("password has at least one English lowercase letter (a-z)", () => {
// Arrange
const password = "1234Aa%";
// Act
const result = isValidPassword(password);
// Assert
expect(result).toEqual(true);
});

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.

Note:

  • One check for valid case is probably enough. Besides, having a lowercase letter (or digit, etc.) does not necessary make a password valid.

  • Your tests for invalid cases are comprehensive. Well done.

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.

awesome, 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 Jul 11, 2026
@tomdu3 tomdu3 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 Jul 11, 2026
@cjyuan

cjyuan commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Changes look good. Well done.

@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 Jul 12, 2026
@tomdu3

tomdu3 commented Jul 12, 2026

Copy link
Copy Markdown
Author

Thank you CJ for your time.

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. Module-Structuring-And-Testing-Data The name of the module. 🏝️ Priority Stretch Do this once mandatory work is done 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants