Skip to content

London | 26-ITP-May | Jorvan White | Sprint 3 | Practice TDD - #1602

Open
JorvanW wants to merge 30 commits into
CodeYourFuture:mainfrom
JorvanW:coursework/sprint-3-practice-tdd
Open

London | 26-ITP-May | Jorvan White | Sprint 3 | Practice TDD#1602
JorvanW wants to merge 30 commits into
CodeYourFuture:mainfrom
JorvanW:coursework/sprint-3-practice-tdd

Conversation

@JorvanW

@JorvanW JorvanW commented Aug 3, 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

Created Pull Request from Sprint 3 Task and updated for Pull Request

JorvanW and others added 30 commits June 10, 2026 12:20
@JorvanW JorvanW added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 3, 2026
@hackertainment hackertainment added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 7, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

semicolon missing in line 5 and line 8.

fun fact: In the original design of JavaScript, there was no semicolon, but it has been added later on - so that nowadays JS programmers generally follow the practice of adding semicolon.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There should be one more boundary case making char has no occurrence in str. Can you think of that special case?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think the question requires to also handle 2nd and 3rd etc. Since the question itself may not be quite clear about that, you may clarify in slack channel. Thanks.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

if the question requires to also handle 2nd and 3rd etc, then there will be more test cases.

Comment on lines +2 to +3
if (times === 0) {
return "";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why this if is needed?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How about empty string (with the same set of counts 3, 1, 0, -1)?

@hackertainment hackertainment 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.

You basically got the right direction. Good work, and keep it up :-)

@hackertainment hackertainment added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 7, 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