Skip to content

Conversation

@alexandru-pocovnicu
Copy link

@alexandru-pocovnicu alexandru-pocovnicu commented Oct 3, 2025

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

In this pill request I have fixed errors, interpreted and implemented code

Questions

@alexandru-pocovnicu alexandru-pocovnicu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 3, 2025
Comment on lines 8 to 18
if(hours<1){
return `12:${minutes} am`
}
if(hours==12 && minutes==00){
return "12:00 pm"
}
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.

  • Because hours won't be negative, if (hours == 0) would probably be more readable than if (hours < 1).

  • What is the 12-hour clock equivalent of 24-hour clock time "12:59"?

  • What do you expect from the following function calls? Are the return values formatted consistently?

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

Choose a reason for hiding this comment

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

  • 12:59 pm

  • 1:33 am

  • 1:33 pm

Copy link
Contributor

Choose a reason for hiding this comment

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

Did your function return the values you expect from these function calls?

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

Choose a reason for hiding this comment

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

i got 01:33 am
and 1:33 pm
I think that's right

Copy link
Contributor

Choose a reason for hiding this comment

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

"01:33 am" is not quite the same as "1:33 am".

@cjyuan cjyuan 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 Oct 12, 2025
@alexandru-pocovnicu
Copy link
Author

thank you

@alexandru-pocovnicu alexandru-pocovnicu 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 Oct 20, 2025
let sqh = height * height;
let bmi = weight / sqh;

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?

Choose a reason for hiding this comment

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

it returns a number , but the requrements don't specify should return

Copy link
Contributor

Choose a reason for hiding this comment

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

Is the value of bmi.toFixed(1) a number or a string? They may "look" the same when we use console.log() to output them on the screen, but internally they are represented differently.

The spec does not specify what type of value the function should return, but what is your expectation? I am just concern if your code matches your expectation or not.

Choose a reason for hiding this comment

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

you are right , i was expecting the function to return a number, didn't realise .toFixed() turned it in to a string

Comment on lines 8 to 18
if(hours<1){
return `12:${minutes} am`
}
if(hours==12 && minutes==00){
return "12:00 pm"
}
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.

Did your function return the values you expect from these function calls?

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

@cjyuan cjyuan 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 Oct 20, 2025
@alexandru-pocovnicu alexandru-pocovnicu 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 Oct 23, 2025
Comment on lines 7 to 11
const minutes=time.slice(3,5)
if(hours===0){
if(hours==0){
return `12:${minutes} am`
}
if(hours===12 ){
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change the === if one of the if statements, but not the other?

Choose a reason for hiding this comment

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

i shouldn't have changed it in the first place

@cjyuan cjyuan 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 Oct 23, 2025
@alexandru-pocovnicu alexandru-pocovnicu 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 Oct 24, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Oct 24, 2025

Well done.

@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. labels Oct 24, 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