Glasgow | 26-ITP-Jan| Martin McLean | Sprint 2 | coursework#963
Glasgow | 26-ITP-Jan| Martin McLean | Sprint 2 | coursework#963mjm-git185 wants to merge 5 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.
|
|
||
| // // =============> write the error message here | ||
| // /home/martinmclean158/Module-Structuring-and-Testing-Data/Sprint-2/1-key-errors/0.js:8 | ||
| // let str = `${str[0].toUpperCase()}${str.slice(1)}`; |
There was a problem hiding this comment.
I think the error message is wrong. Try running it again
| // // =============> write your new code here | ||
| function multiply(a, b) { | ||
| const result = a * b; | ||
| console.log(result); |
There was a problem hiding this comment.
Since there is a console.log of the result outside the function, is there a need for the console.log in the function?
| // =============> yes thay all give 3 | ||
| // Explain why the output is the way it is | ||
| // =============> write your explanation here | ||
| // because the variable is a consrent |
There was a problem hiding this comment.
Based on your explanation.
It means if I add const num = 103; to your solution before getLastDigit(), will it return 3 for all the console logs?
| function calculateBMI(weight, height) { | ||
| // return the BMI of someone based off their weight and height | ||
| } No newline at end of file | ||
| let bmi = weight/(height*height) |
There was a problem hiding this comment.
Can you explain why you used let instead of const?
| // You will need to come up with an appropriate name for the function | ||
| // Use the MDN string documentation to help you find a solution | ||
| // This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase | ||
| function SNAKE_CASE (mesasge){ |
There was a problem hiding this comment.
Does the name of the function follow the appropriate naming convention? Does it explain what the function does?
|
|
||
| // b) What is the value assigned to num when pad is called for the first time? | ||
| // =============> write your answer here | ||
| // "null" |
There was a problem hiding this comment.
Since totalHours is the value used to call pad for the first time. Try doing a console.log to be sure it is null
|
i have made the changes needed |
I can't find the changes you made. |
Changelist
my coursework