Manchester | 26-ITP-May | Abdu Hassen | Sprint 2 | structure and testing data #1435
Open
Abduhasen wants to merge 2 commits into
Open
Manchester | 26-ITP-May | Abdu Hassen | Sprint 2 | structure and testing data #1435Abduhasen wants to merge 2 commits into
Abduhasen wants to merge 2 commits into
Conversation
Sambuxc
reviewed
Jul 1, 2026
| // =============> write your explanation here | ||
| // =============> write your explanation here: firstly the process start accepting that it is a function and takes | ||
| // the parameter to hold the place then it go through the function but by the 5th line | ||
| // the function return and the value will come out undefined |
There was a problem hiding this comment.
How does javascript see undefined?
What does this tell you about js that it returns undefined?
Author
There was a problem hiding this comment.
- javascript sees
undefinedas if there is no value assigned and it is returning with out a value. - this tell me about javascript if we didn't assigned a value to and if the terminate the function with out returning it will see it as value not given to it and it doesn't know the value.
Sambuxc
reviewed
Jul 1, 2026
| // Finally, correct the code to fix the problem | ||
| // =============> write your new code here | ||
| // =============> write your new code here: function getLastDigit(num) { | ||
| // return num.toString().slice(-1); |
There was a problem hiding this comment.
What does -1 represent when passing into slice?
Author
There was a problem hiding this comment.
- when using
sliceif we apple-1to thesliceit represent that it is starting from the last index but not including it.
Sambuxc
reviewed
Jul 1, 2026
| // 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 toCapitalizedSnakeCase(str) { |
There was a problem hiding this comment.
Is this capitalising each word or does it uppercase the whole word, because your function name tells me one thing but its return output gives me another.
Author
There was a problem hiding this comment.
1.the function is about changing all the given string to uppercase and also to snakecase and i changed the function name to more understandable name 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
1.interpreting of codes with explanation.
2.fixing errors.
3.writing a code depending on a given statement.
4.debugging of code.
Questions
N/A