London | 26-ITP-Jan | Divine Mankrado | Sprint 2 | Sprint-2#1169
London | 26-ITP-Jan | Divine Mankrado | Sprint 2 | Sprint-2#1169divinmank wants to merge 15 commits intoCodeYourFuture:mainfrom
Conversation
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.
This comment has been minimized.
This comment has been minimized.
Sprint-2/1-key-errors/0.js
Outdated
| // =============> I've given the variable a new name, newStr, to avoid redclaring the variable. | ||
| // =============> function capitalise(str) { | ||
| // let newStr = `${str[0].toUpperCase()}${str.slice(1)}`; | ||
| // return newStr; |
There was a problem hiding this comment.
This is a way to do it. Is there a better way to do it in one line without redeclaring a variable within the function?
There was a problem hiding this comment.
Yes. This is the other way to do it. Should I update my code with this?
function capitalise(str) {
return str[0].toUpperCase() + str.slice(1);
}
| function calculateBMI(weight, height) { | ||
| // return the BMI of someone based off their weight and height | ||
| return (weight/(height**2)).toFixed(1); | ||
| } No newline at end of file |
There was a problem hiding this comment.
Is there a better way to write the code to make it more readable? Also, look into the bmi calculation to make sure the right calculation is done within your code.
There was a problem hiding this comment.
Thanks for the comment! I've updated the code
| function upperSnakeCase(str){ | ||
| return str.toUpperCase().split(" ").join("_"); | ||
| } |
There was a problem hiding this comment.
Good way to handle some edge cases from the passed argument
Theoreoluwa
left a comment
There was a problem hiding this comment.
Good job so far; you should look through the comments to improve. You also have a task not attended to for this sprint which is in folder 5. Ensure that is done along with your next PR.
|
@divinmank 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? |
|
Sorry for the late update - I have made the relevant adjustments. Sorry for any inconveniences caused. |
I was under the impression that the 5th task "5-stretch-extend" is optional. Is it mandatory to complete this folder? |
I would recommended you should as it helps you. It's quite straightforward for this task. |
Theoreoluwa
left a comment
There was a problem hiding this comment.
Well done and keep going! You can take on the stretch task, as it helps you build an understanding of tests as you move on.
|
The changed files in this PR don't match what is expected for this task. Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints. Please review the changed files tab at the top of the page, we are only expecting changes in this directory: If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
1 similar comment
|
The changed files in this PR don't match what is expected for this task. Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints. Please review the changed files tab at the top of the page, we are only expecting changes in this directory: If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
Learners, PR Template
Self checklist
Changelist
I edited errors as prompted and added comments explaining some of the code.