Manchester | 26-ITP-May | Szidonia Bodo | Sprint 2 | Coursework#1438
Manchester | 26-ITP-May | Szidonia Bodo | Sprint 2 | Coursework#1438bodoszidi wants to merge 11 commits into
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.
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.
LonMcGregor
left a comment
There was a problem hiding this comment.
Good start, well done attempting the stretch task. Some of the earlier tasks might have issues, see my comments
| //return percentage; | ||
| //} | ||
|
|
||
| //console.log(convertToPercentage(decimalNumber)); |
There was a problem hiding this comment.
If you try to run this test, does it work correctly?
There was a problem hiding this comment.
The correct answer will be
function convertToPercentage(decimalNumber) {
const percentage = ${decimalNumber * 100}%;
return percentage;
}
console.log(convertToPercentage(0.45));
we shouldn't declare the decimal number inside the function - as it was already declared as a parameter
| // Finally, correct the code to fix the problem | ||
| // =============> write your new code here | ||
| //function multiply(a, b) { | ||
| //return(a * b); |
There was a problem hiding this comment.
Do you need to include these brackets here?
There was a problem hiding this comment.
No brackets are needed:
function multiply(a, b) {
return a * b;
}
There was a problem hiding this comment.
Good work - nice implementation of the pad function.
|
Good answers. In future, if you have changes, you can commit them and they'll be automatically added on to the PR. For now, this task is complete |
Self checklist
Changelist
Completed sprint 2 coursework