Repository navigation
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3 similar comments
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.
|
|
||
| function capitalise(str) { | ||
| let str = `${str[0].toUpperCase()}${str.slice(1)}`; | ||
| str = `${str[0].toUpperCase()}${str.slice(1)}`; |
There was a problem hiding this comment.
| str = `${str[0].toUpperCase()}${str.slice(1)}`; | |
| str = `${str[0].toUpperCase()}${str.slice(1)}`; |
Hi I you've done a great work identifying the error. To be more precise,
The real problem here is that str is declared twice: once as the function parameter
once again with let str = ...
| // =============> write your new code here | ||
| // ===========> write your new code here | ||
| function multiply(a, b) { | ||
| return (a, b); |
There was a problem hiding this comment.
| return (a, b); | |
| return (a* b); |
I think this is still is still incorrect. It should be return a * b; to be able to perform the multiplication.
|
Thanks for putting in the effort and working through all the exercises. I can see you're trying to understand the errors and debug the code well. There are a few places that I think needs correction before this is fully complete as I will show you below 3-mandatory-implement/1-bmi.js: the formula is correct, but the function should return a string rounded to 1 decimal place. |
Updated calculateBMI function to return a formatted string with one decimal place.
Updated the capitalise_all_letters function to use replaceAll for replacing spaces with underscores. Added additional console log for testing.

Learners, PR Template
Self checklist
Task code
CYF-1053
Changelist
Completed exercises
Questions
No questions