Skip to content

Birmingham | 26-ITP-May | Tobias Amaechina | Sprint 2 | coursework#1424

Open
Tobias-Amaechina wants to merge 46 commits into
CodeYourFuture:mainfrom
Tobias-Amaechina:acoursework/sprint-2
Open

Birmingham | 26-ITP-May | Tobias Amaechina | Sprint 2 | coursework#1424
Tobias-Amaechina wants to merge 46 commits into
CodeYourFuture:mainfrom
Tobias-Amaechina:acoursework/sprint-2

Conversation

@Tobias-Amaechina

@Tobias-Amaechina Tobias-Amaechina commented Jun 28, 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 refactored the formatAs12HourClock function and enhanced the associated test suite to correctly handle edge‑case time conversions, specifically Midnight (00:00:00) and Midday (12:00:00). It also includes several clarity and consistency, I also improvements across the codebase.
I did Identified and fixed a scope issue involving a global variable.
Explained why the earlier version of the code failed and how the fix resolved the issue.
Reused logic from Sprint‑1 by extracting it into a properly named function.
I Implemented a reusable function with clear naming conventions.
I Called the function with two arguments and verified correct output via console logging.
Added a missing return statement to ensure the function produced a usable result.

…error occured at line 9 as pasted in the file
…ble decimalNumber, and the refence error occurs to show that the variable decimalNumber is not a global varaible
…ion printed a value and the one ouside that called the fuction using template literal produce undefine
… statement before the expression a +b could be reached
@Tobias-Amaechina Tobias-Amaechina added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 28, 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 Jun 28, 2026
@github-actions

This comment has been minimized.

@Tobias-Amaechina Tobias-Amaechina added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 28, 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 Jun 28, 2026
@Tobias-Amaechina Tobias-Amaechina changed the title Birmingham| 25-ITP-May | Tobias Amaechina | Sprint 2 | coursework Birmingham | 26-ITP-May | Tobias Amaechina | Sprint 2 | coursework Jun 28, 2026
@github-actions

This comment has been minimized.

@Tobias-Amaechina Tobias-Amaechina added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 28, 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 on these tasks - they're almost all done. Just a few small comments

// return the BMI of someone based off their weight and height
} No newline at end of file
}
console.log(calculateBMI(70, 1.73)); // should return 23.4 No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The calculation works here, but be careful about what the task is asking. The function should be returning the BMI to 1 decimal place. Your function is returning a string. How would you need to change this to match the task specification?

return `${hours}:00 pm`;
}
if (hours===0){
return `${12}:00 am`;

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 be using a template string here if the content is a number?

@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 Jul 4, 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