Skip to content

London | 25-ITP-May | Surafel Workneh | Data structure | Sprint 2 | #667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

SuWebOnes
Copy link

@SuWebOnes SuWebOnes commented Jul 19, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

SuWebOnes added 15 commits June 24, 2025 22:37
…pdate comments for clarity Sprint-2/1-key-errors/0.js
… parameter definition and error explanation in Sprint-2/1-key-errors/2.js
…d explain function for clarity in Sprint-2/2-mandatory-debug/0.js
… return the sum of two numbers and explain code for clarity in Sprint-2/2-mandatory-debug/1.js
…x getLastDigit function to correctly return the last digit of a number and update comments for clarity in Sprint-2/2-mandatory-debug/2.js
…hy it always returns '3' in Sprint-2/2-mandatory-debug/2.js
…sed on weight and height, including detailed comments for clarity in Sprint-2/3-mandatory-implement/1-bmi.js
…KE_CASE with example usage Sprint-2/3-mandatory-implement/2-cases.js
…tted pounds with example usage Sprint-2/3-mandatory-implement/3-to-pounds.js
…ps of input data or edge cases as you can, and fix any bugs in Sprint-2/5-stretch-extend/format-time.js
@SuWebOnes SuWebOnes added the Needs Review Participant to add when requesting review label Jul 19, 2025
@cjyuan cjyuan added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 19, 2025
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Code looks good. Well done. I just have one question.

const BMI = weight / heightSquared;
// return the BMI to 1 decimal place
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 it to return?

Copy link
Author

Choose a reason for hiding this comment

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

number including decimals

Copy link
Author

Choose a reason for hiding this comment

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

fixed to return type to numbers

Comment on lines 19 to 26
//split the string into an array of words
const wordsArray = string.split(" ");
// Convert each word to uppercase
const upperWordsArray = wordsArray.map((word) => word.toUpperCase());
// Join the array back into a string with underscores
const toUpperSnakeCase = upperWordsArray.join("_");
// Return the string in UPPER_SNAKE_CASE
return toUpperSnakeCase;
Copy link
Contributor

Choose a reason for hiding this comment

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

You could also apply toUpperCase() to the whole string before split or after join.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 19, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Jul 19, 2025

Changes look good.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and review comments have been addressed and removed Reviewed Volunteer to add when completing a review labels Jul 19, 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 review comments have been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants