Skip to content

Glasgow | 26-ITP-Jan| Martin McLean | Sprint 2 | coursework#963

Closed
mjm-git185 wants to merge 7 commits into
CodeYourFuture:mainfrom
mjm-git185:Coureswork_Sprint-2
Closed

Glasgow | 26-ITP-Jan| Martin McLean | Sprint 2 | coursework#963
mjm-git185 wants to merge 7 commits into
CodeYourFuture:mainfrom
mjm-git185:Coureswork_Sprint-2

Conversation

@mjm-git185

@mjm-git185 mjm-git185 commented Feb 13, 2026

Copy link
Copy Markdown

Changelist

  • 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

my coursework

@github-actions

This comment has been minimized.

@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 13, 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 Feb 13, 2026
@github-actions

This comment has been minimized.

@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 13, 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 Feb 13, 2026
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 13, 2026
@Edu-Vin Edu-Vin added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. 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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 13, 2026
Comment thread Sprint-2/1-key-errors/2.js Outdated

// // =============> write the error message here
// /home/martinmclean158/Module-Structuring-and-Testing-Data/Sprint-2/1-key-errors/0.js:8
// let str = `${str[0].toUpperCase()}${str.slice(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.

I think the error message is wrong. Try running it again

Comment thread Sprint-2/2-mandatory-debug/0.js Outdated
// // =============> write your new code here
function multiply(a, b) {
const result = a * b;
console.log(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.

Since there is a console.log of the result outside the function, is there a need for the console.log in the function?

Comment thread Sprint-2/2-mandatory-debug/2.js Outdated
// =============> yes thay all give 3
// Explain why the output is the way it is
// =============> write your explanation here
// because the variable is a consrent

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Based on your explanation.

It means if I add const num = 103; to your solution before getLastDigit(), will it return 3 for all the console logs?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You didn't answer this.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@mjm-git185 look at this

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

// because the variable is a const before the code block when num is called it can't be changed

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think you should study global and local variables and how scope works. It will help you understand this code better

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

my understanding was that the const out side of the code block was in the global scope and because of that would over ride the local scope of the code block, so when it is run the console.log would pick up the global and ignore the local "num"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If a new variable of the same name is declared within the code block, the code will use that new variable and ignore the global variable. Reason why when you passed num into that function, it used what was passed and not the global num.

Comment thread Sprint-2/3-mandatory-implement/1-bmi.js Outdated
function calculateBMI(weight, height) {
// return the BMI of someone based off their weight and height
} No newline at end of file
let bmi = weight/(height*height)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you explain why you used let instead of const?

// You will need to come up with an appropriate name for the function
// Use the MDN string documentation to help you find a solution
// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase
function SNAKE_CASE (mesasge){

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Does the name of the function follow the appropriate naming convention? Does it explain what the function does?


// b) What is the value assigned to num when pad is called for the first time?
// =============> write your answer here
// "null"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since totalHours is the value used to call pad for the first time. Try doing a console.log to be sure it is null

@Edu-Vin Edu-Vin 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 Feb 13, 2026
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 14, 2026
@mjm-git185

Copy link
Copy Markdown
Author

i have made the changes needed

@mjm-git185 mjm-git185 requested a review from Edu-Vin February 14, 2026 12:19
@Edu-Vin

Edu-Vin commented Feb 14, 2026

Copy link
Copy Markdown

i have made the changes needed

I can't find the changes you made.

@Edu-Vin

Edu-Vin commented Feb 14, 2026

Copy link
Copy Markdown

You are supposed to make your changes to this pull request. @mjm-git185

@mjm-git185

Copy link
Copy Markdown
Author

i edited them on vs code and pushed them to git-hub

@Edu-Vin

Edu-Vin commented Feb 14, 2026

Copy link
Copy Markdown

i edited them on vs code and pushed them to git-hub

From your VS Code, you are supposed to checkout to this branch mjm-git185:Coureswork_Sprint-2, make your changes and push

@mjm-git185

Copy link
Copy Markdown
Author

i have pushed it up and the version i can see is the most recent one #7bc1235

@Edu-Vin

Edu-Vin commented Feb 14, 2026

Copy link
Copy Markdown

i have pushed it up and the version i can see is the most recent one #7bc1235

Seen

@mjm-git185

Copy link
Copy Markdown
Author

that one has the revisions

@Edu-Vin Edu-Vin 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 14, 2026
@illicitonion

Copy link
Copy Markdown
Member

Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it.

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.

3 participants