-
-
Notifications
You must be signed in to change notification settings - Fork 197
WM | May-2025 | Abdullah Saleh | Sprint-2 #554
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
base: main
Are you sure you want to change the base?
WM | May-2025 | Abdullah Saleh | Sprint-2 #554
Conversation
…'num' to the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work on this sprint, and your answers are good and work fine. I left some small comments around style to see if you can think of any ways you could improve what you've written.
squaredHeight = height * height; | ||
BodyMassIndex = (weight / squaredHeight).toFixed(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to follow the normal guidelines for declaring variables - anything you would change when declaring BodyMassIndex
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your feedback, yes, I supposed to use const
to declare the variables. I made the changes and committed it.
} | ||
toPounds((penceString = "399p")); | ||
toPounds((penceString = "102p")); | ||
toPounds((penceString = "1025p")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What effect does passing in (penceString = "399p")
have here? Could you simplify these function calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your feedback.
You're right — the assignment inside the function call was unnecessary and could be confusing. I've now simplified the function calls by removing the assignment and just passing the string literals directly to toPounds().
Good fixes for your answers. You are now complete with sprint 2. Well done! |
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.