Skip to content

London | 26-ITP-Sep | Chandramani Gaire | Sprint 2 | Module-Data-Group - #1515

Open
gaireprakash20-ops wants to merge 14 commits into
CodeYourFuture:mainfrom
gaireprakash20-ops:Sprint-2
Open

gaireprakash20-ops wants to merge 14 commits into
CodeYourFuture:mainfrom
gaireprakash20-ops:Sprint-2

Conversation

@gaireprakash20-ops

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

Task code

CYF-1083

Changelist

I have done all the course work and created new file for the Invert.js ans have pushed it along with the rest of file

@github-actions

This comment has been minimized.

@gaireprakash20-ops gaireprakash20-ops changed the title Sprint 2London | 26-ITP-Sep | Chandramani Gaire | Sprint 1 | Module-Data-Group London | 26-ITP-Sep | Chandramani Gaire | Sprint 2 | Module-Data-Group Nov 11, 2026
@gaireprakash20-ops gaireprakash20-ops added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 11, 2026

@gaireprakash20-ops gaireprakash20-ops left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

please review this file

@LonMcGregor LonMcGregor 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 Nov 16, 2026
Comment on lines +21 to +25
if (decodedKey in queryParams) {
if (Array.isArray(queryParams[decodedKey])) {
queryParams[decodedKey].push(decodedValue);
} else {
queryParams[decodedKey] = [queryParams[decodedKey], decodedValue];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What happens when a query string contains a key such as toString or __proto__? Does in here distinguish keys already parsed from properties inherited by queryParams?

To "like" or "dislike" this comment, please follow this link

Comment on lines +27 to +29
test("contains on empty object returns false", () => {
expect(contains({}, "name")).toBe(false);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Now that this case has an implementation test, what will Jest still report from the earlier test.todo? The same leftover TODO is present in lookup.test.js.

To "like" or "dislike" this comment, please follow this link

// ==>It turns an object into an array of [key, value] pairs. Object.entries({ a: 1, b: 2 }) gives [["a", 1], ["b", 2]]. It’s needed because a for...of loop can’t go through a plain object directly, and the function needs both the key and the value of each property. Object.entries provides both, and const [key, value] unpacks each pair.
// d) Explain why the current return value is different from the target output

// ==>first it used the dot notation instead of square bracket which is accessing the property using a literal name

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Does the issue with invertedObj.key come from dot notation itself, or from which property name that expression accesses?

To "like" or "dislike" this comment, please follow this link

@cyf-ai-code-reviewer cyf-ai-code-reviewer Bot 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 Nov 16, 2026
@cyf-ai-code-reviewer

Copy link
Copy Markdown

The CYF AI review has left comments. It will only review a PR one time. When you have addressed these comments, please request review again and a volunteer will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants