Skip to content

London | 26-ITP-Sep | Hanna Bohlin | Sprint 2 | Sprint 2 coursework - #1526

Open
habohlin wants to merge 22 commits into
CodeYourFuture:mainfrom
habohlin:Sprint-2-Coursework
Open

habohlin wants to merge 22 commits into
CodeYourFuture:mainfrom
habohlin:Sprint-2-Coursework

Conversation

@habohlin

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 answered questions and solved error issues in the files in folders 1, 2, 3 and 4, in order.

@netlify

netlify Bot commented Sep 16, 2026

Copy link
Copy Markdown

Deploy Preview for cyf-onboarding-module ready!

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

@habohlin habohlin added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 16, 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.

Nearly there. The thought experiment in 4-random.js with 60 to 70 is a really clear way to explain it, and spotting in 3-to-pounds.js that the padEnd can never take effect is a good catch.

Three things to sort before I mark this Complete:

  1. Function calls. 1-percentage-change.js a) counts four and 2-time-format.js b) says none. Both files have one more on line 10. See the comments on lines 18 and 22.
  2. 2-mandatory-errors/1.js, 2.js and 4.js explain the fix but never say what the error was. The task asks you to run the original, read the error node prints, and explain it. You did exactly that in 3.js, which is the model. Put the original back for a moment in each of the other three, run it, and write the message and the reason above your fix.
  3. Formatting. Prettier fails on eight of the files. Same as you did for Form Controls: open each file in Sprint-2, right click, Format Document, save and commit. Turning on format on save would do it for you from now on.

Add the Needs Review label again once you've pushed.


// a) How many function calls are there in this file? Write down all the lines where a function call is made

// 4 function calls are made.

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 on lines 4 and 5 is right. What is console.log(...) on line 10?

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.

Five, yes. console.log is the easy one to miss.


// b) How many function calls are there?

// 0

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.

Same question as in the other file: what is console.log(result) on line 10?

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.

Same one, yes.

Comment thread Sprint-2/2-mandatory-errors/1.js Outdated
let age = 33;
age = age + 1;

// Answer: I changed the const to let, so the variable age becomes reassignable

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 is right. Change it back to const for a moment and run the file. What does node print, word for word, and what is it about const that causes it? That's the part the exercise is after, like you did in 3.js.

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.

That's the message, and you've done the same in 2.js and 4.js.

Comment thread Sprint-2/1-key-exercises/3-paths.js Outdated
const dir = ;
const ext = ;
const dir = filePath.slice(0,lastSlashIndex);
console.log(`The dir parth of ${filePath} is ${dir}`);

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.

Not a blocker: "parth".

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.

Thanks.

@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 16, 2026
@habohlin habohlin 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 16, 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.

All fixed, marking this as complete, well done

@abdishakoor-dev abdishakoor-dev added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants