London | 26-ITP-January | Karla Grajales | Sprint 2 | Coursework/sprint 2#925
Open
Grajales-K wants to merge 14 commits intoCodeYourFuture:mainfrom
Open
London | 26-ITP-January | Karla Grajales | Sprint 2 | Coursework/sprint 2#925Grajales-K wants to merge 14 commits intoCodeYourFuture:mainfrom
Grajales-K wants to merge 14 commits intoCodeYourFuture:mainfrom
Conversation
…p ignoring parameters with hardcoded values
…e and remove the spaces and replace with underScores. I implement toUpperCase() and replace()
…umber and set the display result as Money
…e, one is to separate hours, minutes and seconds and the pad() is formatting the time displayed
LonMcGregor
reviewed
Feb 10, 2026
LonMcGregor
left a comment
There was a problem hiding this comment.
Well done on this task so far, you have given good explanations to the debugging tasks.
I have left a couple of comments where you could improve further.
For learning, I would suggest understanding the basics before starting on using built-in functions. Something that might be interesting is seeing if you can write your own forEach or map function, and once you've got that down, then just using the built in functions.
| @@ -1,20 +1,41 @@ | |||
| // Predict and explain first... | |||
|
|
|||
| const { t } = require("tar"); | |||
|
|
||
| function convertToPercentage(num) { | ||
|
|
||
| const percentage = `${num * 100}%`; |
There was a problem hiding this comment.
Could you simplify this to one line?
| // return the BMI of someone based off their weight and height | ||
| const squareHeight = height * height; | ||
| const operation = weight / squareHeight; | ||
| console.log(operation); |
There was a problem hiding this comment.
Good solution - do you need to keep this console.log if the solution is finished?
|
|
||
| function toPounds(str){ | ||
|
|
||
| const onlyNumbers = str.replace(/[^\d]/g, ''); |
There was a problem hiding this comment.
This is a really interesting approach!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
In this project, I implemented and refactored functions to handle data conversion (Time and Currency). I also documented the execution flow of nested functions and how parameters are processed when functions are invoked sequentially.
Questions
What is the most effective learning path for mastering functions: should I focus on core logic like loops first, or move directly to built-in array methods (like .forEach or .map)?