London | 26-ITP-May | Jorvan White | Sprint 3 | Practice TDD - #1602
London | 26-ITP-May | Jorvan White | Sprint 3 | Practice TDD#1602JorvanW wants to merge 30 commits into
Conversation
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
There should be one more boundary case making char has no occurrence in str. Can you think of that special case?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
if the question requires to also handle 2nd and 3rd etc, then there will be more test cases.
| if (times === 0) { | ||
| return ""; |
There was a problem hiding this comment.
How about empty string (with the same set of counts 3, 1, 0, -1)?
hackertainment
left a comment
There was a problem hiding this comment.
You basically got the right direction. Good work, and keep it up :-)
Self checklist
Changelist
Created Pull Request from Sprint 3 Task and updated for Pull Request