Skip to content

Conversation

@asaniDev
Copy link

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

finished all the tasks for coursework sprint 2

@asaniDev asaniDev added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 17, 2025
@cjyuan cjyuan added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 25, 2025
}
// return the BMI of someone based off their weight and height
const bmi = weight / height ** 2;
return bmi.toFixed(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

What type of value do you expect the function to return? A number or a string?
Does your function return the type of value you expect?

Copy link
Author

Choose a reason for hiding this comment

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

the function will return a string representation of the equivalent number with the specified number of decimal places. I had expected it to produce a number but because i used the toFixed() method to shorten the answer to the required number of decimal places this changed.

Copy link
Contributor

@cjyuan cjyuan Oct 31, 2025

Choose a reason for hiding this comment

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

When a function does not perform as expected, shouldn't we change the function to meet our expectation (instead of the other around)?

Copy link
Author

Choose a reason for hiding this comment

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

converted bmi to number.

Comment on lines 12 to 17

if (hours > 12) {
return `${hours - 12}:00 pm`;
return `${hours - 12}:${minutes} pm`;
}
return `${time} am`;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you expect from the following function calls?

  formatAs12HourClock("00:00");
  formatAs12HourClock("01:01");
  formatAs12HourClock("13:01");    

Does your function return the value you expected?

Copy link
Author

Choose a reason for hiding this comment

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

the 00:00 input did not give the expected value. I added a condition to handle the hours between midnight and 01 am so all 00 hours.

Copy link
Contributor

Choose a reason for hiding this comment

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

What about making the format of the returned string values from these two function calls more consistent?

  formatAs12HourClock("01:01");
  formatAs12HourClock("13:01");

Copy link
Author

Choose a reason for hiding this comment

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

thank you i had missed that, made the format for both times match, romved the trailing zero.

@cjyuan cjyuan 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 Oct 25, 2025
@asaniDev asaniDev added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 31, 2025
@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 31, 2025
@asaniDev asaniDev added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 16, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Nov 16, 2025

Changes look good!

@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 Nov 16, 2025
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.

2 participants