Skip to content

Manchester | 26-ITP-May | Joanne O’Malley | Sprint 3 | Practice TDD#1353

Open
joanne342 wants to merge 13 commits into
CodeYourFuture:mainfrom
joanne342:sprint-3-practice-tdd
Open

Manchester | 26-ITP-May | Joanne O’Malley | Sprint 3 | Practice TDD#1353
joanne342 wants to merge 13 commits into
CodeYourFuture:mainfrom
joanne342:sprint-3-practice-tdd

Conversation

@joanne342

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

Sprint 3 | Practice TDD

@joanne342 joanne342 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 17, 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 the first two tasks, you need to re-attempt the repeat task however

Comment thread Sprint-3/2-practice-tdd/repeat-str.js Outdated
// Your implementation of this function must *not* call String.prototype.repeat (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat).
// The goal is to re-implement that function, not to use it.
return "hellohellohello";
return str.repeat(count);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did you read the comment in this task? The goal is to implement without using the repeat method. Can you try again?

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.

Yes, Sorry, I overlooked it. I've changed it to

return Array.from({ length: count }, () => str).join("");

@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 Jun 22, 2026
@joanne342 joanne342 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 Jun 23, 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.

Almost done, still some changes needed though

Comment thread Sprint-3/2-practice-tdd/repeat-str.js Outdated
// Your implementation of this function must *not* call String.prototype.repeat (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat).
// The goal is to re-implement that function, not to use it.
return str.repeat(count);
return Array.from({ length: count }, () => str).join("");

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 is an interesting approach. I can see what you are going for. Have you tried testing this function as it is written? There might be something still missing.

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.

I didn't test it because I'm on my work laptop and I'm not allowed to install anything but I made a codespace and tested it now and added a conditional in case of a negative count.

@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 Jun 23, 2026
@joanne342 joanne342 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 Jun 23, 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.

Great work! always a good idea to fully test before submitting a PR. this task is complete now

@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 Jun 23, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants