Skip to content

Manchester | 26-ITP-Sept | Precious Moses | Sprint 3 | Sprint-3-Stretch-Exercises - #1737

Open
moses77-boop wants to merge 35 commits into
CodeYourFuture:mainfrom
moses77-boop:coursework/sprint-3-stretch
Open

moses77-boop wants to merge 35 commits into
CodeYourFuture:mainfrom
moses77-boop:coursework/sprint-3-stretch

Conversation

@moses77-boop

@moses77-boop moses77-boop commented Oct 19, 2026 •

Copy link
Copy Markdown

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

Task code

CYF-1065

Changelist

In this PR, all exercises where attempted including implementing arrays, and playing-computer.

@moses77-boop moses77-boop added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 19, 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.

Could you use a formatter to keep the code consistently formatted?

Comment on lines +20 to +25
const password = "12345";
const password = "Ab7xn";

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.

  • A valid password must meet all the requirements specified on lines 8-13. "Ab7xn" is not a valid password because it does not contain one of the required non-alphanumeric symbols.

  • isValidPassword() can return false if the password fails to meet any one of the six requirements. To test whether the function correctly enforces requirement A, provide a password that satisfies all the other requirements but fails requirement A. This ensures that the test isolates and verifies requirement A specifically.

    Note: You don't have to check if the function can return true in this category because you have already done that on lines 19-21.

Comment on lines +39 to +45
const password = "ab7#x";
const result = isValidPassword(password);
expect(result).toEqual(true);
});

test("password has at least one number", () => {
const password = "Ab7#x";

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.

The function should return false for these two passwords.

Comment on lines +57 to +58
const previousPassword = ["Ab7#x"];
const result = isValidPassword(previousPassword);

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 should be the first and second arguments of isValidPassword?

@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 Oct 23, 2026
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