Skip to content

Cape Town | sep-2026-ITP | Edward kganyago | Sprint 3 | CYF-1053 - #1633

Open
edwardkganyago45-source wants to merge 11 commits into
CodeYourFuture:mainfrom
edwardkganyago45-source:sprint3
Open

edwardkganyago45-source wants to merge 11 commits into
CodeYourFuture:mainfrom
edwardkganyago45-source:sprint3

Conversation

@edwardkganyago45-source

@edwardkganyago45-source edwardkganyago45-source commented Sep 30, 2026 •

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1053

Changelist

Completed Sprint 3 course work

@netlify

netlify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit dbc121d
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6abd753b9b35b900089486e9
😎 Deploy Preview https://deploy-preview-1633--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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.

@edwardkganyago45-source edwardkganyago45-source added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 30, 2026
@github-actions

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 30, 2026
@github-actions

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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 iscmiguelsamaniego left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Nice work exploring default parameters!
Quick question: When you run console.log(\hello${greet("12:00")} how are you?), what gets printed in the console and why does undefined show up in the middle of the string?"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix using string1! Just a quick note: str is 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?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 that console.log to see the percentage result?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Great job fixing the parameter name!

Quick question: How would you test this function by calling it and logging the result to the console?"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Great job fixing that to use return instead of console.log!
Quick question: Do the extra parentheses around (a * b) change how the code behaves, or are they optional?"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a close look at where num comes from inside getLastDigit.

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?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's break down the formula step by step:

  1. Squaring the height: In JavaScript, the ^ symbol is a bitwise operator, not a power exponent. To square a number, you can use height * height or height ** 2.
  2. The operation: The instructions state to divide the weight by the squared height, rather than multiplying.
  3. 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)?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Great job! Using regular expressions (/ /g) with replace and toUpperCase is a very clean solution.
Quick question: What happens if there are multiple spaces between words, like "hello there", and how could we handle that?"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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?"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Almost there! Let's check a couple of small things:

  1. Syntax check: Look closely right after the pad function—it's missing a closing curly brace } before formatTimeDisplay starts, which will cause a syntax error.
  2. Question (d): When pad is called for the last time (for the seconds), the value assigned to num is 1 (since 61 % 60 = 1).
  3. Question (e): The return value of that specific call to pad(1) is "01". (Note: "00:01:01" is the final result of the whole formatTimeDisplay function, whereas pad only 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?"

@edwardkganyago45-source edwardkganyago45-source changed the title Cape Town| 26-ITP-Sept | Edward Kganyago | Sprint 3 | Coursework/sprint 3 Cape Town| 26-ITP-Sept | Edward Kganyago | Sprint 3 | CYF-1053- #1618 Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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.

@edwardkganyago45-source edwardkganyago45-source changed the title Cape Town| 26-ITP-Sept | Edward Kganyago | Sprint 3 | CYF-1053- #1618 Cape Town| 26-ITP-Sept | Edward Kganyago | Sprint 3 | CYF-1053 Oct 3, 2026
@edwardkganyago45-source edwardkganyago45-source added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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.

@edwardkganyago45-source edwardkganyago45-source added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 3, 2026
@edwardkganyago45-source edwardkganyago45-source changed the title Cape Town| 26-ITP-Sept | Edward Kganyago | Sprint 3 | CYF-1053 Cape Town| sep-2026-ITP | Edward Kganyago | Sprint 3 | CYF-1053 Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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.

@edwardkganyago45-source edwardkganyago45-source changed the title Cape Town| sep-2026-ITP | Edward Kganyago | Sprint 3 | CYF-1053 Cape Town | sep-2026-ITP | Eward Kganyago | Sprint 3 | CYF-1053 Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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.

@edwardkganyago45-source edwardkganyago45-source changed the title Cape Town | sep-2026-ITP | Eward Kganyago | Sprint 3 | CYF-1053 Cape Town | sep-2026-ITP | Edward kganyago | Sprint 1 | CYF-1053 Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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.

@edwardkganyago45-source edwardkganyago45-source changed the title Cape Town | sep-2026-ITP | Edward kganyago | Sprint 1 | CYF-1053 Cape Town | sep-2026-ITP | Edward kganyago | Sprint 3 | CYF-1053 Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

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: Sprint-2/1-key-exercises/4-random.js

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants