London | 26-ITP-Jan | Gloria Mankrado | sprint 2 | Coursework#1154
London | 26-ITP-Jan | Gloria Mankrado | sprint 2 | Coursework#1154gloriamanks wants to merge 1 commit intoCodeYourFuture:mainfrom
Conversation
| function calculateBMI(weight, height) { | ||
| const bmi = weight / (height * height); | ||
| return Math.round(bmi * 10) / 10; |
There was a problem hiding this comment.
Is there a better method to return the bmi value in one decimal place?
|
|
||
| function toUpperSnakeCase(str) { | ||
| return str.toUpperCase().replace(/ /g, '_'); | ||
| // return the string in UPPER_SNAKE_CASE | ||
| } No newline at end of file |
There was a problem hiding this comment.
Is it best to pass in //g as an argument in your .replace method?
|
|
||
| function toPounds(kilograms) { | ||
| return kilograms * 2.20462; | ||
| // return the weight in pounds | ||
| } No newline at end of file |
There was a problem hiding this comment.
You should read the context of the task to understand what you are to do. The task is referring to the code from the previous sprint, which you are to work with to actualise the given task.
| // e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer | ||
| // =============> write your answer here | ||
| // The return value of `pad(1)` is "01". No newline at end of file |
There was a problem hiding this comment.
You could further explain your reason for this answer by analysing the full output of the given code when the function is called with the passed in argument.
Theoreoluwa
left a comment
There was a problem hiding this comment.
Great job so far, Gloria; look through the attached comments for improvement. Also, note, you have one more unattended task for this sprint, which is in folder number 5. Kindly look into that to be added in your next pr.
|
@gloriamanks this PR has been reviewed 4 days ago and you still haven't replied. Until you do, this volunteer cannot work on another PR, so you are blocking them. Can you please reply today? |
Learners, PR Template
Self checklist
Changelist
completed exercise for 1 key errors, 2 mandatory debug, 3 mandatory implement and 4 mandatory interpret