Skip to content

Glasgow | ITP MAY | MIRABELLE MORAH | Module Data Groups | Sprint-2 #587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mirabellemorah
Copy link

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Created tests

Questions

liN

@mirabellemorah mirabellemorah added the Needs Review Participant to add when requesting review label Jul 12, 2025
@mirabellemorah mirabellemorah marked this pull request as draft July 12, 2025 10:39
@mirabellemorah mirabellemorah marked this pull request as ready for review July 14, 2025 07:40
@LonMcGregor LonMcGregor added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Participant to add when requesting review labels Jul 14, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Good solutions to this sprint. You are complete with this sprint

expect(contains(undefined, "a")).toBe(false);
expect(contains(42, "a")).toBe(false);
});
});

Choose a reason for hiding this comment

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

Good tests

expect(parseQueryString("name=John%20Doe&city=New%20York")).toEqual({
name: "John Doe",
city: "New York",
});

Choose a reason for hiding this comment

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

Good test cases

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

Choose a reason for hiding this comment

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

This is a clever and quick way of initialising the object


// d) Explain why the current return value is different from the target output

// ... The current implementation incorrectly assigns the value to the key property of invertedObj instead of using the value as a key in invertedObj. fixed by using invertedObj[value] = key;

Choose a reason for hiding this comment

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

Good explanations

Copy link
Author

Choose a reason for hiding this comment

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

I'm grateful and thank you

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and review comments have been addressed and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 14, 2025
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 review comments have been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants