Skip to content

Comments

London | 26-ITP-January | Laura C | Sprint 2 | Structuring and Testing Data#960

Open
lauracs24 wants to merge 12 commits intoCodeYourFuture:mainfrom
lauracs24:acoursework/sprint-2
Open

London | 26-ITP-January | Laura C | Sprint 2 | Structuring and Testing Data#960
lauracs24 wants to merge 12 commits intoCodeYourFuture:mainfrom
lauracs24:acoursework/sprint-2

Conversation

@lauracs24
Copy link

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

Changelist

I worked through all Sprint 2 exercises by predicting errors, running the code with node, and explaining why issues occurred before fixing them. In the debug section, I identified logic problems and corrected the functions so they returned the correct values. I also implemented the required functions (calculateBMI, toUpperSnakeCase, and toPounds) and completed the interpret task by analysing the code step by step and answering the questions.

Questions

What is a reliable way of learning javascript easily and testing yourself?

@lauracs24 lauracs24 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. Module-Structuring-And-Testing-Data The name of the module. labels Feb 12, 2026
@lauracs24 lauracs24 moved this to 👀 In review in Coursework Planner Feb 12, 2026
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Both the code and the explanations are good.

I only have a question and some suggestions.

Comment on lines -6 to +8
const num = 103;
// I think the program will print 3 every time.
// Even though different numbers are passed into the function,
// the function is using the variable 'num', which is 103.
Copy link
Contributor

Choose a reason for hiding this comment

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

It is possible to have a global variable and a parameter named num in a script. For example,

const num = 103;

function getLastDigit(num) {
  return num.toString().slice(-1);
}

Can you find out why?

Copy link
Author

Choose a reason for hiding this comment

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

Ah I think the issue was not the shared variable name, but that the function did not define a parameter. I have updated my explanation to reflect this

Copy link
Contributor

Choose a reason for hiding this comment

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

Your change is good, and you are right about the function not having a parameter.

I meant to point out these two concepts, "identifier scope and identifier resolution, in the context of JavaScript programming". ChatGPT can give a good explanation.

@cjyuan cjyuan 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 Feb 19, 2026
@lauracs24 lauracs24 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 20, 2026
@cjyuan cjyuan 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. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 20, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Feb 20, 2026

Changes look good. Well done.

@lauracs24 lauracs24 moved this from Awaiting Approval🚀 to Structuring and testing data💚 in Coursework Planner Feb 20, 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. Module-Structuring-And-Testing-Data The name of the module. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants