Skip to content

London | 26-ITP-Sep | Ebrahim Moqbel | Sprint 2 | Coursework - #1467

Open
Ebrahim-Moqbel wants to merge 23 commits into
CodeYourFuture:mainfrom
Ebrahim-Moqbel:coursework/sprint-2
Open

Ebrahim-Moqbel wants to merge 23 commits into
CodeYourFuture:mainfrom
Ebrahim-Moqbel:coursework/sprint-2

Conversation

@Ebrahim-Moqbel

@Ebrahim-Moqbel Ebrahim-Moqbel commented Sep 3, 2026

Copy link
Copy Markdown

Learners, PR Template

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-1039

Changelist

I have met the requirements and specifications of the following files :
key-exercises
mandatory errors
mandatory interpret

Questions

N/A

@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit 1dd1e64
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6aafdb82530b2d0008a82262
😎 Deploy Preview https://deploy-preview-1467--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.

@Ebrahim-Moqbel Ebrahim-Moqbel added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 2 Assigned during Sprint 2 of this module labels Sep 3, 2026
@Ebrahim-Moqbel Ebrahim-Moqbel added 📅 Sprint 1 Assigned during Sprint 1 of this module and removed 📅 Sprint 1 Assigned during Sprint 1 of this module labels Sep 5, 2026
@github-actions

This comment has been minimized.

@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 5, 2026
@github-actions

This comment has been minimized.

@Ebrahim-Moqbel Ebrahim-Moqbel added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 5, 2026
@github-actions

This comment has been minimized.

@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 5, 2026
@Ebrahim-Moqbel Ebrahim-Moqbel added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed 📅 Sprint 2 Assigned during Sprint 2 of this module labels Sep 5, 2026
@github-actions

This comment has been minimized.

@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 5, 2026
@github-actions

This comment has been minimized.

@Ebrahim-Moqbel Ebrahim-Moqbel added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 5, 2026
Comment thread Sprint-2/3-mandatory-interpret/1-percentage-change.js Outdated
Comment thread Sprint-2/3-mandatory-interpret/2-time-format.js Outdated
Comment thread Sprint-2/3-mandatory-interpret/2-time-format.js Outdated
Comment thread Sprint-2/1-key-exercises/4-random.js Outdated
Comment thread Sprint-2/3-mandatory-interpret/2-time-format.js
@webmonch

Copy link
Copy Markdown

Good job! A few bits needs another look but its getting there!

@webmonch webmonch added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Sep 14, 2026
@Ebrahim-Moqbel Ebrahim-Moqbel added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Sep 14, 2026
@Ebrahim-Moqbel

Copy link
Copy Markdown
Author

Hi @webmonch, I have answered the Questions and updated the answers accordingly

Thank you for your valuable suggestions I believe it is ready to be reviewed now.

@abdishakoor-dev abdishakoor-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Most of the earlier comments are sorted, thanks. Your answer to f) in 2-time-format.js is a really good one.

A few things still to do:

  1. 2-mandatory-errors/4.js has not been started. It is the one file in that folder you have not touched, and it still stops with an error.

  2. 3-mandatory-interpret/1-percentage-change.js answer d), see my comment.

  3. 1-key-exercises/4-random.js line 11, see my comment.

  4. 3-mandatory-interpret/2-time-format.js answer c), see my comment.

  5. 2-mandatory-errors/1.js, see my comment.

  6. Could you run Prettier on the files you have changed? Ten of them are not formatted at the moment.

One more thing, and this one does not block the PR. The first four commits on this branch are from January, about Wireframe/articles.md. They are on your fork's main, so every branch you make from it picks them up. That is why the bot kept flagging this PR, and your Sprint 3 PR has the same thing. To clear it, sync your fork's main so it matches CodeYourFuture's main exactly, rather than merging into it. On GitHub, open your fork, click Sync fork, and if it offers "Discard commits" take that option. Worth doing before you start Sprint 4, if you haven't already.

Add the Needs Review label again when you have pushed.

Comment thread Sprint-2/3-mandatory-interpret/1-percentage-change.js Outdated
Comment thread Sprint-2/1-key-exercises/4-random.js Outdated
Comment thread Sprint-2/3-mandatory-interpret/2-time-format.js Outdated
Comment thread Sprint-2/2-mandatory-errors/1.js
Comment thread Sprint-2/3-mandatory-interpret/2-time-format.js Outdated
@abdishakoor-dev abdishakoor-dev added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 20, 2026
@Ebrahim-Moqbel Ebrahim-Moqbel added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Sep 20, 2026

@abdishakoor-dev abdishakoor-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Four of the six are done, thanks. The explanation in 1.js is accurate, and the rename in 4.js runs.

Three things left:

  1. 2-mandatory-errors/4.js, see my comment.

  2. 3-mandatory-interpret/2-time-format.js line 36, see my comment.

  3. Formatting. "My code is consistently formatted" is on your PR checklist, and the tool that does it for you is called Prettier. It rearranges spacing and indentation to one agreed style, so that your code is easy to read and so that a reviewer only sees the changes you meant to make, not stray spaces and tabs. Eleven of your twelve files fail that check at the moment.

    Prettier comes with the CYF extension pack you were asked to install during onboarding. If you are not sure you have it, open VS Code, go to Extensions, and search for CodeYourFuture Extension Pack; install it if it is not there: https://marketplace.visualstudio.com/items?itemName=CodeYourFuture.cyf-extension-pack

    Then open each of your Sprint-2 files, right click in the editor, choose Format Document, and pick Prettier if VS Code asks which formatter to use. Save, commit the changes it makes, and push. To make this happen every time you save, follow the format on save steps here: https://github.com/CodeYourFuture/Module-JavaScript-Fundamentals/blob/main/practical_guide.md

Add the Needs Review label again when you have pushed.

@@ -1,2 +1,5 @@
const 12HourClockTime = "8:53pm";
const 24hourClockTime = "20:53";
const twelveHourClockTime = "8:53pm";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The rename is right and the file runs now. Section 2 of the Sprint 2 README also asks you to interpret the error and explain why it happened, and there is nothing written down in this file. Put the two original lines back for a moment, run node 4.js, and write down what node prints and why it happens. You can delete the log on line 5 once you have checked it.

/*whole positive value: for the 8784 seconds the formatted duration would be fine 2:26:24 and the code would be working as expected
under 60 seconds: 59 seconds would assign the hours and minutes both as 0s resulting 0:0:59 instead of the normal formatted way 00:00:59 but still correct
zero value: the formatted duration would also be correct 0:0:0 even though it is an unusual value it still show that it can handle it
Negative value: for the -8784 seconds would give us an output of -2:-26:-29 which is not a valid format and doesn't make any sense

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You changed the positive case on line 33 to 8784, good. This line still carries the seconds from the old number. What does the program print for -8784?

@abdishakoor-dev abdishakoor-dev added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants