London | 25-ITP-Sep | Adnaan Abo | Sprint 2 | Coursework/sprint 2#712
London | 25-ITP-Sep | Adnaan Abo | Sprint 2 | Coursework/sprint 2#712AdnaanA wants to merge 12 commits intoCodeYourFuture:mainfrom
Conversation
|
Your PR couldn't be matched to an assignment in this module. Please check its title is in the correct format, and that you only have one PR per assignment. 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). |
LonMcGregor
left a comment
There was a problem hiding this comment.
Good start on this sprint's tasks, I have spotted a few areas where you could improve code further
| return bmi; | ||
| } | ||
|
|
||
| console.log(calculateBMI(weight, height).toFixed(1)); // should return 26.7 No newline at end of file |
There was a problem hiding this comment.
The BMI calculation has to be to 1 decimal place, according to the specification. You're fixing the position in your log, after the function returns. Is that the best way to implement this?
There was a problem hiding this comment.
The best practice is letting the function return the BMI formatted to 1 decimal place, rather than having it fixed in the log.
|
|
||
|
|
||
| function toPounds(penceString) { | ||
| const penceStringWithoutTrailingP = penceString.substring( |
There was a problem hiding this comment.
Very minor issue - I would recommend adding indentation within functions so we can more easily see when we are inside and outside a function
There was a problem hiding this comment.
Thank you for the feedback indentation is now fixed.
|
Great, thanks for changing this. You are have now completed this task |
Self checklist
completed sprint2 coursework by answering the questions within the tasks fixing the codes and creating functions and testing for functionality.