Cape Town | sep-2026-ITP | Edward kganyago | Sprint 3 | CYF-1053 - #1633
edwardkganyago45-source wants to merge 11 commits into
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
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. |
|
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. |
|
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. |
iscmiguelsamaniego
left a comment
There was a problem hiding this comment.
Fantastic work overall! You have shown brilliant progress in mastering core JavaScript fundamentals:
working with variables and assignment, writing and invoking reusable functions, using template literals, handling string methods, and working through time and math calculations.
Your dedication to debugging errors step by step is really paying off. Keep up the amazing work!
There was a problem hiding this comment.
"Nice work exploring default parameters!
Quick question: When you runconsole.log(\hello${greet("12:00")} how are you?), what gets printed in the console and why doesundefinedshow up in the middle of the string?"
There was a problem hiding this comment.
Great fix using
string1! Just a quick note:stris a valid variable name, but the error happened because it was already declared as a parameter.
Quick question: Do you need to store the result in a new variable, or could you return the template literal directly?
There was a problem hiding this comment.
Good job fixing the function body!
Quick question: When you run
console.log(convertToPercentage);, what gets printed in the terminal, and how do you need to write thatconsole.logto see the percentage result?
There was a problem hiding this comment.
"Great job fixing the parameter name!
Quick question: How would you test this function by calling it and logging the result to the console?"
There was a problem hiding this comment.
"Great job fixing that to use
returninstead ofconsole.log!
Quick question: Do the extra parentheses around(a * b)change how the code behaves, or are they optional?"
There was a problem hiding this comment.
Take a close look at where
numcomes from insidegetLastDigit.
Quick question: How can you update the function definition so it accepts an argument and uses the number passed to it instead of the global
num = 103?
There was a problem hiding this comment.
Let's break down the formula step by step:
- Squaring the height: In JavaScript, the
^symbol is a bitwise operator, not a power exponent. To square a number, you can useheight * heightorheight ** 2.- The operation: The instructions state to divide the weight by the squared height, rather than multiplying.
- Decimal places: To format the result to 1 decimal place as requested, you can use the
.toFixed(1)method.What would the code look like if you combine division, squaring, and
.toFixed(1)?
There was a problem hiding this comment.
"Great job! Using regular expressions (
/ /g) withreplaceandtoUpperCaseis a very clean solution.
Quick question: What happens if there are multiple spaces between words, like"hello there", and how could we handle that?"
There was a problem hiding this comment.
"Great job turning this into a working, reusable function and testing it with
"900p"!
Quick question: Look at the first line (let penceString = string;). Is that extra variable necessary, or could you use the function parameter directly?"
There was a problem hiding this comment.
"Almost there! Let's check a couple of small things:
- Syntax check: Look closely right after the
padfunction—it's missing a closing curly brace}beforeformatTimeDisplaystarts, which will cause a syntax error.- Question (d): When
padis called for the last time (for the seconds), the value assigned tonumis1(since61 % 60 = 1).- Question (e): The return value of that specific call to
pad(1)is"01". (Note:"00:01:01"is the final result of the wholeformatTimeDisplayfunction, whereaspadonly returns the formatted piece for that single call).Try adding the missing closing brace and running your
console.log(formatTimeDisplay(61))—what does it output in the terminal?"
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |

Self checklist
Task code
CYF-1053
Changelist
Completed Sprint 3 course work