Birmingham | 26-ITP-May | Tobias Amaechina | Sprint 2 | coursework#1424
Open
Tobias-Amaechina wants to merge 46 commits into
Open
Birmingham | 26-ITP-May | Tobias Amaechina | Sprint 2 | coursework#1424Tobias-Amaechina wants to merge 46 commits into
Tobias-Amaechina wants to merge 46 commits into
Conversation
…unction with argument tobias which worked
…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
…be passed during function call
…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
…ment and it worked
…plementing a function with apprioprate name
…or the first time
…t output '00:00am' instead of '12:00am'
…get output' for the assertion to work
…dnight code in the function body as noticed that assertion still fails
…here is no leading zeros
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
LonMcGregor
reviewed
Jul 4, 2026
LonMcGregor
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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`; |
There was a problem hiding this comment.
Do you need to be using a template string here if the content is a number?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
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.