Skip to content

Glasgow| May-26-ITP | Yat Long Chan | Sprint 2 | Coursework#1361

Open
Motorcycle-lab wants to merge 9 commits into
CodeYourFuture:mainfrom
Motorcycle-lab:acoursework/sprint-2
Open

Glasgow| May-26-ITP | Yat Long Chan | Sprint 2 | Coursework#1361
Motorcycle-lab wants to merge 9 commits into
CodeYourFuture:mainfrom
Motorcycle-lab:acoursework/sprint-2

Conversation

@Motorcycle-lab

@Motorcycle-lab Motorcycle-lab commented Jun 18, 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

Changelist

I have finished the sprint 2 of coursework required to submit in the pull request.

Questions

How do I remember longer function as a beginner ? Should I decompose the sentence structure ? What approaches do you recommend me to understand the fundamental of the function ?

@Motorcycle-lab Motorcycle-lab changed the title Glasgow| 25-ITP-May | Yat Long Chan | Sprint 2 | Sprint 2 | Acoursework/sprint 2 Glasgow| 25-ITP-May | Yat Long Chan | Sprint 2 | Acoursework/sprint 2 Jun 18, 2026
@github-actions

This comment has been minimized.

5 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Motorcycle-lab Motorcycle-lab changed the title Glasgow| 25-ITP-May | Yat Long Chan | Sprint 2 | Acoursework/sprint 2 Glasgow| 25-ITP-May | Yat Long Chan | Sprint 2 | Structuring and testing data Jun 18, 2026
@github-actions

This comment has been minimized.

@Motorcycle-lab Motorcycle-lab changed the title Glasgow| 25-ITP-May | Yat Long Chan | Sprint 2 | Structuring and testing data Glasgow| 25-ITP-May | Yat Long Chan | Sprint 2 | Complete Sprint 2 coursework Jun 18, 2026
@github-actions

This comment has been minimized.

@Motorcycle-lab Motorcycle-lab changed the title Glasgow| 25-ITP-May | Yat Long Chan | Sprint 2 | Complete Sprint 2 coursework Glasgow| 25-ITP-May | Yat Long Chan | Sprint 2 | Coursework Jun 18, 2026
@github-actions

This comment has been minimized.

@Motorcycle-lab Motorcycle-lab changed the title Glasgow| 25-ITP-May | Yat Long Chan | Sprint 2 | Coursework Glasgow| May-26-ITP | Yat Long Chan | Sprint 2 | Coursework Jun 18, 2026
@github-actions

This comment has been minimized.

@Motorcycle-lab Motorcycle-lab 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 Jun 18, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good start on this tasks, I have some suggestions and comments in the tasks for you to resolve

For your question
I would suggest to run code, and run it often as you are writing, so you can spot if there are problems.

We don't expect you to remember every single function, the best way is to do lots of tasks, as well as katas, as you read. Writing code as you go is a good way of learning how different functions work.

I also suggest making your comments actual //coments, this way your editor will highlight valid and invalid js more easily

Comment thread Sprint-2/2-mandatory-debug/0.js Outdated
and return the expression.

/ function multiply(a, b) {
return (a * b);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do you need to use the brackets here?

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.

it is not necessary, you can just return a* b;

Comment thread Sprint-2/2-mandatory-debug/1.js Outdated

function sum(a, b) {
return;
a + b;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

When you run this code, does it work correctly?

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.

no it does not work , because it should be return a+b , and it should not have the ;

Comment thread Sprint-2/3-mandatory-implement/1-bmi.js Outdated

let newheight = height / 100;
let num = weight / (newheight ** 2);
let idea = num.toFixed(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.

Is "idea" a good variable name here?


// Implement a function that:
function convertToUpperCase(text) {
const result = text.toUpperCase();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

it is upper cased now, how can you make it "snake case"?

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.

yes by adding underscore .

return `${time} am`;
}

else if(hours=== 0o0){

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What does 0o0 mean here?

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.

yes I should add the case when if (hours ==== 0) to consider the 00:00 in the morning .

@LonMcGregor LonMcGregor 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 Jun 23, 2026
@Motorcycle-lab Motorcycle-lab 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 Jun 29, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good work,this sprint is complete now

@LonMcGregor LonMcGregor 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 Jun 30, 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. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants