Skip to content

London| 26-ITP-May | Martin Mwaka | Sprint 3 | Stretch#1464

Open
Temceo wants to merge 10 commits into
CodeYourFuture:mainfrom
Temceo:stretch
Open

London| 26-ITP-May | Martin Mwaka | Sprint 3 | Stretch#1464
Temceo wants to merge 10 commits into
CodeYourFuture:mainfrom
Temceo:stretch

Conversation

@Temceo

@Temceo Temceo commented Jul 5, 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

Changelist

I have completed sprint 3 stretch tasks in folder 4-stretch

@Temceo Temceo 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 5, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good work on these stretch tasks. I have some comments

Comment thread Sprint-3/4-stretch/find.js Outdated
// Pay particular attention to the following:

// a) How the index variable updates during the call to find
// [MM] - The index variable increments by one each time the letter (str[index]) at the current index does not match the target letter (char)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tip: You don't need to include your name in comments as git keeps track of who made what changes.

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.

Noted

Comment thread Sprint-3/4-stretch/card-validator.js Outdated
// Must have more than one type of number
const hasMultipleDistinctDigits = new Set(cardStr.split("")).size > 1;

return has16Digits &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks correct, but can you read the task specification again? See what the return type of the function is meant to be.

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.

Noted, I have updated the return type to boolean


const checks = {
minLength: password.length > 4,
hasUpperCase: /[A-Z]/.test(password),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

good use of regular expressions here

@LonMcGregor LonMcGregor 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 13, 2026
@Temceo Temceo 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 17, 2026
@LonMcGregor

Copy link
Copy Markdown

Good that you now return a boolean. Do you understand how a ternary operator ? : works? Do you need to be using one here?

@LonMcGregor LonMcGregor 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 20, 2026
@Temceo

Temceo commented Jul 20, 2026

Copy link
Copy Markdown
Author

Ternary operator is not needed as the a boolean will be return based on whether conditions for the && operator are met or not. I have removed it

@Temceo Temceo 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 20, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good work, if you are ever returning a true/false it's good idea to see if you can directly return the boolean expression instead.

@LonMcGregor LonMcGregor 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 20, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants