London | 26-Sep-ITP | Frumentius Tesfay | Sprint 3 | Coursework - #1589
Frumentius-Rev wants to merge 16 commits into
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hey, I removed one of the code comments but left the others. I’ll make sure to remove all unnecessary comments next time to keep the code tidy and professional. |
| // If I give the new variable a different name, I hope it should work :) | ||
|
|
||
| function capitalise(str) { | ||
| let newString = `${str[0].toUpperCase()}${str.slice(1)}`; |
There was a problem hiding this comment.
good analysis but can be variable name be something better ? a name that suggests what it holds
There was a problem hiding this comment.
oh, you’re right! I didn’t focus on using a descriptive name in the first place. I think capitalisedString is clearer and tidier. Thank you for pointing that out!
| return percentage; | ||
| } | ||
|
|
||
| console.log(convertToPercentage("26")); |
There was a problem hiding this comment.
Although the updated function is correct, could you check again what parameter says should be passed into the function ?
| console.log(a * b); | ||
| return a * b; | ||
| } | ||
| console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`); |
There was a problem hiding this comment.
Is there a possibility that the logs are being duplicated ?
| // This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase | ||
|
|
||
| function toUpper(input) { | ||
| return input.replaceAll(" ", "_").toUpperCase(); |
There was a problem hiding this comment.
apart from uppercase, is this function perhaps adding something that does not exist in the input ?
There was a problem hiding this comment.
Yeah, I noticed that it also replaces the spaces with underscores besides converting to uppercase.
|
|
||
| // c) What is the return value of pad when it is called for the first time? | ||
| // =============> write your answer here | ||
| // 00 |
There was a problem hiding this comment.
even though the answer is correct, could it perhaps be a different return type ?
|
|
||
| // e) What is the return value of pad when it is called for the last time in this program? Explain your answer | ||
| // =============> write your answer here | ||
| // 01 |
There was a problem hiding this comment.
even though the answer is correct, could it perhaps be a different return type ?

Learners, PR Template
Self checklist
Task code
CYF-1053
Changelist
I have demonstrated debugging and interpretation skills and completed the Sprint 3 requirements.