Birmingham | 26-ITP-May | Gabriel Pawuoi| Sprint 2 | Coursework #1467
Birmingham | 26-ITP-May | Gabriel Pawuoi| Sprint 2 | Coursework #1467KhotKeys wants to merge 3 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
| // b) num = 0 (totalHours) when pad is called for the first time. | ||
|
|
||
| // Call formatTimeDisplay with an input of 61, now answer the following: | ||
| // c) pad(0): "0".length < 2, so prepend "0" -> "00". Return value: "00" | ||
|
|
||
| // b) What is the value assigned to num when pad is called for the first time? | ||
| // =============> write your answer here | ||
| // d) num = 1 (remainingSeconds) when pad is called for the last time. | ||
| // It is the last argument passed in the template literal. | ||
|
|
||
| // c) What is the return value of pad is called for the first time? | ||
| // =============> write your answer here | ||
|
|
||
| // d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer | ||
| // =============> write your answer here | ||
|
|
||
| // e) What is the return value of pad when it is called for the last time in this program? Explain your answer | ||
| // =============> write your answer here | ||
| // e) pad(1): "1".length < 2, so prepend "0" -> "01". Return value: "01" |
There was a problem hiding this comment.
These answers are good, but it could be a little confusing to gauge the answers mean without the context of the questions since you deleted them. This is somewhat true of the other questions as well, it's not the end of the world but bear in mind that if you were to ever look back on this repo, you'd have to look at the commits to see the diffs (i.e. what we can see right now in GitHub) in order to understand the work.
There was a problem hiding this comment.
Note: you don't need to do anything in response to this comment, but I just wanted to highlight it for your own reference in case you should want to do anything.
|
|
||
| function capitalise(str) { | ||
| let str = `${str[0].toUpperCase()}${str.slice(1)}`; | ||
| str = `${str[0].toUpperCase()}${str.slice(1)}`; |
There was a problem hiding this comment.
Generally we reassign the value of a variable if we want to update the value whilst the recognising that what the value represents has stayed the same. Here, you're reassigning str to be something that represents a different thing. Considering this, can you think of an alternative approach to reassigning the existing str variable that would make this a little bit more readable?
|
Hi @KhotKeys! It's been a couple of weeks, so I'm just reminding you that there is 1 comment on here that warrants a change in your submission. Once you've done that I am happy to mark as complete 🙂 |
|
…apitalise to use new const instead of reassigning parameter
|
Excellent! I'm really sorry to hear about your tech problems 🙁 well done getting this sorted! |
|
The files changed 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 'files changed' tab at the top of the page. Here is an example of a file that has been changed on this branch but shouldn't be: 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 files changed 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 'files changed' tab at the top of the page. Here is an example of a file that has been changed on this branch but shouldn't be: 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
completed all mandatory and stretch