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 +18 to +28
let sqh=height*height;
let bmi=weight/sqh;
let bmiS=bmi.toString()


if(bmiS.includes(".")){
let dotBmiS=bmiS.indexOf(".")
return (Number(bmiS.slice(0,dotBmiS+2)))
} return bmi

}
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Indentation is a bit off. Can you improve the indentation? You can try using the "Format Document" feature in
    VSCode to help you indent the code.
  • Why terminated only some of the statements with a semicolon?
  • Why use truncation instead of rounding to approximate the result to 1 decimal place?

Note: There are simpler ways (which involve using some built-in functions) to truncate/round a number to 1 decimal place.

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");  

@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
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