London | 26-ITP-May | Ebrahim Moqbel | Sprint 2 | course work - #1582
Open
Ebrahim-Moqbel wants to merge 16 commits into
Open
London | 26-ITP-May | Ebrahim Moqbel | Sprint 2 | course work #1582Ebrahim-Moqbel wants to merge 16 commits into
Ebrahim-Moqbel wants to merge 16 commits into
Conversation
selyafi
reviewed
Jul 29, 2026
| // =============> write your explanation here | ||
| // =============> write your new code here | ||
| } | ||
| capitalise("ebrahim"); |
There was a problem hiding this comment.
You call the function but never print it, so the file outputs nothing
selyafi
reviewed
Jul 29, 2026
| // =============> write your new code here | ||
| } | ||
| capitalise("ebrahim"); | ||
| capitalise('salomi'); |
There was a problem hiding this comment.
You call the function but never print it, so the file outputs nothing
selyafi
reviewed
Jul 29, 2026
| let str = `${str[0].toUpperCase()}${str.slice(1)}`; | ||
| return str; | ||
| } | ||
| return str[0].toUpperCase()+str.slice(1); |
There was a problem hiding this comment.
It is correct, but the code itself needs formatting. Missing indent inside the function
selyafi
reviewed
Jul 29, 2026
| // =============> write your prediction here | ||
| /* | ||
| I predict the function will throw a SyntaxError as the variable str has already been declared in the function parameter | ||
| function capitalize will capitalise the first letter with index 0 |
There was a problem hiding this comment.
a typo in capitalize, since the function has different name.
selyafi
reviewed
Jul 29, 2026
| /* the reason why getLastDigit isn't working properly is that it doesn't accept any arrguments where there isn't any perameters in its difination. | ||
| where it uses the golabal varaible 'num' decalred outside the funtion and already set to 103 | ||
|
|
||
| The correct code includes a parameter 'number' in the difination this allows the function to accept the number passed to it when called*/ No newline at end of file |
selyafi
reviewed
Jul 29, 2026
| // return the BMI of someone based off their weight and height | ||
| } No newline at end of file | ||
| let result = Number(weight/(height*height)); | ||
| return result.toFixed(1); |
There was a problem hiding this comment.
I would drop the Number on the devision and than return Number(..)
selyafi
reviewed
Jul 29, 2026
| // 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 | ||
| function toUpperSnakeFormat(string){ |
There was a problem hiding this comment.
rename to match the vocabulary brief in the link, i.e toUpperSnakeCase
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
reviewed the completed mandatory exercises and the key errors file further explaining and running the codes for revision purposes and submitting a new PR for the sprint
Questions
N/A