Skip to content

Sheffield | 26-Jan-ITP | Daniel Aderibigbe | Sprint 2 | Coursework/sprint 2#1053

Open
Dan2Clouted wants to merge 5 commits intoCodeYourFuture:mainfrom
Dan2Clouted:coursework/sprint-2
Open

Sheffield | 26-Jan-ITP | Daniel Aderibigbe | Sprint 2 | Coursework/sprint 2#1053
Dan2Clouted wants to merge 5 commits intoCodeYourFuture:mainfrom
Dan2Clouted:coursework/sprint-2

Conversation

@Dan2Clouted
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

Completed all Exercises.

@Dan2Clouted Dan2Clouted added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 20, 2026
@@ -1,3 +1,5 @@
function contains() {}
function contains(object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
Copy link
Contributor

Choose a reason for hiding this comment

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

  • The function is expected to throw an error or return false when object is not an object or is an array.

  • Could also explore Object.hasOwn().

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 21, 2026
@Dan2Clouted
Copy link
Author

Thanks I’ve updated the implementation and tests to better cover the edge cases you pointed out. I handled invalid object inputs for contains added extra edge-case checks for parseQueryString, used objects without inherited properties for tally, and improved countWords to cope better with punctuation, repeated spaces, and special property names.

@Dan2Clouted Dan2Clouted added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 24, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Mar 24, 2026

LGTM.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants