Skip to content

Manchester | 26-ITP-May | Abdu Hassen | Sprint 2 | structure and testing data #1435

Open
Abduhasen wants to merge 2 commits into
CodeYourFuture:mainfrom
Abduhasen:sprint_2_backlog
Open

Manchester | 26-ITP-May | Abdu Hassen | Sprint 2 | structure and testing data #1435
Abduhasen wants to merge 2 commits into
CodeYourFuture:mainfrom
Abduhasen:sprint_2_backlog

Conversation

@Abduhasen

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

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

@Abduhasen Abduhasen added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Jul 1, 2026
@Sambuxc Sambuxc added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 1, 2026
Comment thread Sprint-2/2-mandatory-debug/1.js Outdated
// =============> 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does javascript see undefined?
What does this tell you about js that it returns undefined?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. javascript sees undefined as if there is no value assigned and it is returning with out a value.
  2. 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.

// 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does -1 represent when passing into slice?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. when using slice if we apple -1 to the slice it represent that it is starting from the last index but not including it.

// 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) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@Sambuxc Sambuxc added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 2, 2026
@Abduhasen Abduhasen added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants