London | 26-ITP-May | Edina Kurdi | Sprint 2 | Coursework#1434
Open
edinakurdi wants to merge 13 commits into
Open
London | 26-ITP-May | Edina Kurdi | Sprint 2 | Coursework#1434edinakurdi wants to merge 13 commits into
edinakurdi wants to merge 13 commits into
Conversation
…int 2 > 3-mandatory-implement
This comment has been minimized.
This comment has been minimized.
LonMcGregor
reviewed
Jul 6, 2026
| // =============> write your explanation here | ||
| // =============> write your new code here | ||
| // Uncaught SyntaxError: Identifier 'str' has already been declared - meaning str should not have been used inside the function or the parameter of the function | ||
| function capitalise(str) { |
There was a problem hiding this comment.
Have you tried testing / running this code? Does it work as expected?
Author
There was a problem hiding this comment.
Oh, I accidentally returned the original str - I dont know how i didnt catch that. Fixed now.
FYI I also commented out the code with the error above.
|
|
||
| return percentage; | ||
| } | ||
| console.log(convertToPercentage()); |
There was a problem hiding this comment.
If you give this test a parameter, and run it, does it still work?
Author
There was a problem hiding this comment.
I corrected the function by enabling it to take a parameter and calculate it in %
|
Great, this task is done now. Always remember to fully test the code you've written before opening a PR. |
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
Completed sprint 2 coursework on errors, and debugging