Cape Town | 26-ITP-May | Shafiek Walker | Sprint 3 | Practice TDD#1391
Open
shafiekwalker7861 wants to merge 1 commit into
Open
Cape Town | 26-ITP-May | Shafiek Walker | Sprint 3 | Practice TDD#1391shafiekwalker7861 wants to merge 1 commit into
shafiekwalker7861 wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
c34267d to
f961fe6
Compare
LonMcGregor
reviewed
Jun 29, 2026
LonMcGregor
left a comment
There was a problem hiding this comment.
Good start on this task, there's a few places still to work on though
| // When the repeatStr function is called with these inputs, | ||
| // Then it should return a string that contains the original `str` repeated `count` times. | ||
|
|
||
| function repeatStr(str, count) { |
There was a problem hiding this comment.
Can you put this code into the relevant file please? We try to ensure that test files only have tests in them, and not the actual code.
| function getOrdinalNumber(num) { | ||
| return "1st"; | ||
| if (num % 10 === 1 && num % 100 !== 11) { | ||
| return num + "st"; |
There was a problem hiding this comment.
Does this code work, and do you test for, the other ordinals? What about 2nd, 3rd, 4th etc?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
Completed the Sprint 3 "Practice TDD" exercises.
Wrote and updated Jest tests, implemented the required functions, and verified that all tests pass using
npm test.