Skip to content

Cape Town| 26-ITP-May | Liyema Mfengwana| Sprint 2 | Data Groups - #1444

Open
LiyemaMfengwana wants to merge 21 commits into
CodeYourFuture:mainfrom
LiyemaMfengwana:sprint-2-work
Open

Cape Town| 26-ITP-May | Liyema Mfengwana| Sprint 2 | Data Groups#1444
LiyemaMfengwana wants to merge 21 commits into
CodeYourFuture:mainfrom
LiyemaMfengwana:sprint-2-work

Conversation

@LiyemaMfengwana

Copy link
Copy Markdown

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

Complete work

@LiyemaMfengwana LiyemaMfengwana added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 20, 2026
Comment thread Sprint-2/implement/contains.js Outdated
Comment on lines +2 to +4
if (Array.isArray(object)) {
return false;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you make this function to also return false when the first parameter is not an object? For examples, null, undefined, 1234, "ABCD".

Comment thread Sprint-2/implement/contains.test.js
Comment thread Sprint-2/implement/tally.js Outdated
Comment on lines +5 to +9
const counts = {};

for (const item of items) {
counts[item] = (counts[item] || 0) + 1;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does the following function call returns the value you expect?

tally(["toString", "toString"]);

Suggestion:

  • Look up an approach to create an empty object with no inherited properties, or
  • use 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 Aug 20, 2026
@LiyemaMfengwana LiyemaMfengwana added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 21, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look good.

@cjyuan cjyuan 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 Aug 21, 2026
@cjyuan cjyuan added the Complete Volunteer to add when work is complete and all review comments have been addressed. label Aug 21, 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