London| 26-ITP-Jan| Ebrahim Moqbel | Sprint 3 | Practice-TDD #1233
London| 26-ITP-Jan| Ebrahim Moqbel | Sprint 3 | Practice-TDD #1233Ebrahim-Moqbel wants to merge 1 commit intoCodeYourFuture:mainfrom
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
- Function implementation is correct.
- Tests are comprehensive
- Test descriptions are clear
Well done.
| let count =0; | ||
| for (let i = 0; i < stringOfCharacters.length; i++) { | ||
| if (stringOfCharacters[i] === findCharacter) { | ||
| count+=1; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
The spacing around the operators in this code is not consistent.
Have you installed the prettier VSCode extension and enabled "Format on save/paste" on VSCode,
as recommended in https://github.com/CodeYourFuture/Module-Structuring-and-Testing-Data/blob/main/readme.md
?
If you have enabled "Format on save" but it is not working, it is likely that you haven't assign a formatter for JS file. This could happen if you have zero or multiple extensions that can format .js file.
If you have installed "Prettier" extension. To assign it as the formatter of JS code, you can try:
- Use "Format document" to format the JS file. Sometimes, VSCode will ask you to choose a formatter, and you can manually select "Prettier".
- Edit
settings.jsonand set Prettier as the default formatter for JS.
See: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
|
Can you fix the Markdown syntax on the last two checked checkboxes in the PR description? |
Learners, PR Template
Self checklist
Changelist
I used the jest test and met the criteria for the following files:
-count.js
-get-ordinal-number.js
-repeat-str.test.js