Skip to content

Birmingham | 26-ITP-JAN | Merve Reis | Sprint 2 | Module Structuring and Testing Data#1116

Open
mervereis wants to merge 11 commits intoCodeYourFuture:mainfrom
mervereis:coursework/sprint-2
Open

Birmingham | 26-ITP-JAN | Merve Reis | Sprint 2 | Module Structuring and Testing Data#1116
mervereis wants to merge 11 commits intoCodeYourFuture:mainfrom
mervereis:coursework/sprint-2

Conversation

@mervereis
Copy link

@mervereis mervereis commented Feb 28, 2026

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 created/fixed functions and added comments for predicted issues on the existed code.

@mervereis mervereis added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Feb 28, 2026
@tee4tao tee4tao 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 Mar 1, 2026

// Explain why the output is the way it is
// =============> write your explanation here
// The function `getLastDigit` is not taking any arguments, so it always returns the last digit which is 103.
Copy link

Choose a reason for hiding this comment

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

Just a tiny detail on your first explanation: You wrote that it 'always returns the last digit which is 103'. To be super precise, it returns the string '3', which is the last digit of the global variable 103. But your logic and understanding are 100% correct!

Copy link
Author

@mervereis mervereis Mar 1, 2026

Choose a reason for hiding this comment

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

@tee4tao Sorry for my explanation is not well explained I tried to said same thing as you said in your comment. I updated the comment.

// return the BMI of someone based off their weight and height
} No newline at end of file
// return the BMI of someone based off their weight and height
return Number((weight / (height * height)).toFixed(1));
Copy link

Choose a reason for hiding this comment

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

This is good and using height * height works perfectly for squaring! Out of curiosity, are you familiar with any JavaScript operators or Math methods that are specifically designed for calculating exponents?

Copy link
Author

Choose a reason for hiding this comment

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

@tee4tao When I searched for it I found out i can write the code with math operator like this;
return Number((weight / (height ** 2)).toFixed(1));

Copy link

Choose a reason for hiding this comment

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

Exactly, good job!

// You will need to come up with an appropriate name for the function
// Use the MDN string documentation to help you find a solution
// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase

Copy link

Choose a reason for hiding this comment

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

You have not done the required exercise, any issue with that?

Copy link
Author

Choose a reason for hiding this comment

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

@tee4tao sorry I missed it I updated the file

@tee4tao tee4tao 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 Mar 1, 2026
@mervereis mervereis added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 1, 2026
@tee4tao tee4tao removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 1, 2026
@github-actions

This comment has been minimized.

@tee4tao tee4tao added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 1, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@tee4tao tee4tao added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Complete Volunteer to add when work is complete and all review comments have been addressed. labels Mar 1, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

Copy link

Choose a reason for hiding this comment

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

Remove this file. I believe it's for another Sprint

Copy link
Author

Choose a reason for hiding this comment

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

@tee4tao I reverted the file.

@mervereis mervereis added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. 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. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants