Skip to content

London | 26-ITP-Jan | Alex Okorefe | sprint 2 | coursework#1194

Open
Alex-Os-Dev-Lab wants to merge 24 commits intoCodeYourFuture:mainfrom
Alex-Os-Dev-Lab:sprint-2
Open

London | 26-ITP-Jan | Alex Okorefe | sprint 2 | coursework#1194
Alex-Os-Dev-Lab wants to merge 24 commits intoCodeYourFuture:mainfrom
Alex-Os-Dev-Lab:sprint-2

Conversation

@Alex-Os-Dev-Lab
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

Completed Assignments related to Data Groups Sprint-2

Questions

None for now

Alex-Os-Dev-Lab and others added 18 commits March 14, 2026 14:17
…ts, existing properties, non-existent properties, arrays, and null/undefined inputs
@Alex-Os-Dev-Lab Alex-Os-Dev-Lab added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 11, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 11, 2026
@github-actions

This comment has been minimized.

@Alex-Os-Dev-Lab Alex-Os-Dev-Lab added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 23, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 23, 2026
@Alex-Os-Dev-Lab Alex-Os-Dev-Lab changed the title London | 26-ITP-Jan | Alex Okorefe | Data Groups | Sprint 2 London | 26-ITP-Jan | Alex Okorefe | sprint 2 | coursework Apr 23, 2026
@Alex-Os-Dev-Lab Alex-Os-Dev-Lab added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 23, 2026
Comment thread Sprint-2/implement/contains.js Outdated
Comment on lines +7 to +8
// 2. Check if the propertyName exists as a key in the object
return propertyName in obj;
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.

Consider the following two approaches for determining if an object contains a property:

  let obj = {}, propertyName = "toString";
  console.log( propertyName in obj );                // true
  console.log( Object.hasOwn(obj, propertyName) );   // false

Which of these approaches suits your needs better?
For more info, you can look up JS "in" operator vs Object.hasOwn.

Comment thread Sprint-2/implement/tally.js Outdated
Comment on lines +7 to +12
const counts = {};

for (const item of items) {
// If the item exists, increment; otherwise, initialize to 1
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 Apr 23, 2026
@Alex-Os-Dev-Lab Alex-Os-Dev-Lab 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 Apr 23, 2026
@Alex-Os-Dev-Lab Alex-Os-Dev-Lab added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Apr 23, 2026
@cjyuan
Copy link
Copy Markdown
Contributor

cjyuan commented Apr 23, 2026

Changes look good.

@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. labels Apr 23, 2026
@Alex-Os-Dev-Lab
Copy link
Copy Markdown
Author

Alex-Os-Dev-Lab commented Apr 23, 2026 via email

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