Skip to content

Sheffield | 26-ITP-Jan | Mahmoud Shaabo | Sprint 2 | Module-Data-Groups#1069

Open
mahmoudshaabo1984 wants to merge 1 commit intoCodeYourFuture:mainfrom
mahmoudshaabo1984:sprint-2-exercises
Open

Sheffield | 26-ITP-Jan | Mahmoud Shaabo | Sprint 2 | Module-Data-Groups#1069
mahmoudshaabo1984 wants to merge 1 commit intoCodeYourFuture:mainfrom
mahmoudshaabo1984:sprint-2-exercises

Conversation

@mahmoudshaabo1984
Copy link

Hello Reviewers / CodeYourFuture Team,

I have completed all mandatory and stretch exercises for Sprint 2. I made sure to thoroughly test my code, handle edge cases, and apply refactoring best practices.

Here is a summary of the progress:

  • Debug: Successfully fixed the bugs in address.js, author.js, and recipe.js by utilizing proper object iteration (Object.entries, Object.values) and correct property access.
  • Implement: Implemented the logic for contains, lookup, and tally. I also fixed the querystring function using indexOf("=") and slice() to correctly handle multiple equal signs securely.
  • Interpret: Refactored invert.js using bracket notation to dynamically assign keys and values. All analytical questions (a-e) have been clearly answered in the comments.
  • Stretch (Advanced): - count-words.js: Implemented Regex to remove punctuation, handled case insensitivity, and sorted the final results by frequency.
    • mode.js: Successfully refactored the function into two smaller, single-responsibility functions (countFrequencies and findHighestFrequency) utilizing the Map object.
    • till.js: Fixed the NaN bug by using parseInt() to accurately extract numerical values from strings.

Testing: Verified that all tests across all folders pass successfully using npx jest and manual node testing.

Personal Note for the Team:
Working with Map, Object.entries(), and data type parsing in this sprint greatly improved my understanding of how to safely manipulate complex objects in JavaScript. I have also ensured all my comments explain the "why" behind the code to be fully screen-reader compatible. I look forward to your feedback!

Best regards,
Mahmoud Shaabo

@mahmoudshaabo1984
Copy link
Author

Hi CJ,

I have just submitted my Pull Request for the Sprint 2 exercises. I really enjoyed the challenges in this sprint, especially learning how to refactor functions and using tools like Map, Object.entries(), and parseInt() to handle data safely.

All tests are passing, and I made sure my comments clearly explain the logic behind the code.

I am looking forward to your review and any feedback or suggestions you might have.

Thank you!

@mahmoudshaabo1984 mahmoudshaabo1984 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant