Skip to content

London | 26-ITP-Sep | Rhoda Ajiroba | Sprint 2 | JavaScript Fundamentals - #1572

Open
codebyra wants to merge 12 commits into
CodeYourFuture:mainfrom
codebyra:coursework/sprint-2
Open

codebyra wants to merge 12 commits into
CodeYourFuture:mainfrom
codebyra:coursework/sprint-2

Conversation

@codebyra

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

Completed the Sprint 2 JavaScript Fundamentals coursework, including the key exercises, mandatory errors, and mandatory interpret exercises.

@netlify

netlify Bot commented Sep 22, 2026

Copy link
Copy Markdown

Deploy Preview for cyf-onboarding-module ready!

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

@codebyra codebyra added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 22, 2026
@codebyra

Copy link
Copy Markdown
Author

@cjyuan Please review my pull request

@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.

Your key exercise answers are all correct, and every file runs. The interpret answers are clear and accurate too.

Two things before I can mark this Complete:

  1. 2-mandatory-errors/1.js to 4.js have a fix, but no explanation. For each file, write a comment that says:

    • why the original code failed
    • which error it was. The prep shows three error names: SyntaxError, TypeError and ReferenceError.

    3.js also asks for your prediction, and if it matched. See my comment on each file.

  2. 3-mandatory-interpret/2-time-format.js answer f): try more values. See my comment.

Add the Needs Review label again once you have pushed.

// trying to create an age variable and then reassign the value by 1

const age = 33;
let age = 33;

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 fix works. Why did the original line fail? Which of the three error names was it?


console.log(`I was born in ${cityOfBirth}`);
const cityOfBirth = "Bolton";
console.log(`I was born in ${cityOfBirth}`);

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.

Good fix. Why did the original order fail? Which error was it?

@@ -1,5 +1,5 @@
const cardNumber = 4533787178994213;
const last4Digits = cardNumber.slice(-4);
const last4Digits = cardNumber.toString().slice(-4);

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.

Good fix. This one asks for a prediction first. What did you expect to go wrong? What error did node give? Did it match your prediction? Write your answers below line 9.

@@ -1,2 +1,2 @@
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.

Good names. Why could the original names not be used? Which error was it?


// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
// Answer: No, it will not format all values correctly.
// For example, single-digit minutes or seconds will not have a leading zero.

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.

Good, the missing zeros are one problem. Now try -90 and 90.5. What does each one print? Would you show a time that way?

@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 22, 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.

2 participants