Skip to content

Sheffield | 26-ITP-jan | Richard Frimpong | Sprint 2 | Data Groups#1042

Open
Richiealx wants to merge 10 commits intoCodeYourFuture:mainfrom
Richiealx:coursework/sprint-2-data-groups
Open

Sheffield | 26-ITP-jan | Richard Frimpong | Sprint 2 | Data Groups#1042
Richiealx wants to merge 10 commits intoCodeYourFuture:mainfrom
Richiealx:coursework/sprint-2-data-groups

Conversation

@Richiealx
Copy link

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

This pull request contains my completed work for Sprint 2 - Data Groups.

Debug

  • Fixed address.js (correct object property access)
  • Fixed author.js (correct object iteration)
  • Fixed recipe.js (proper formatting of output)

Implement

  • Implemented contains using own-property checking (avoids inherited properties)
  • Implemented createLookup to convert key-value pairs into an object
  • Implemented tally using Object.create(null) to handle edge cases like "toString"
  • Improved parseQueryString to:
    • handle values containing "="
    • handle missing values and keys
    • ignore trailing "&"
    • decode URL-encoded keys and values

Interpret

  • Analysed and explained the issue in invert.js
  • Fixed implementation using bracket notation
  • Added tests to verify correctness

Stretch

  • Implemented countWords with:
    • punctuation handling
    • case normalisation
    • whitespace handling
    • safe object creation to handle words like "constructor"
  • Refactored calculateMode into smaller helper functions:
    • frequency tracking
    • mode selection

Testing

  • All tests pass successfully
  • 7 test suites and 27 tests passing

@Richiealx Richiealx added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 18, 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