Skip to content

London | 26-ITP-Sept | Fung Nin Lee | Sprint 2 | Data Group - #1526

Open
leerogerfn wants to merge 15 commits into
CodeYourFuture:mainfrom
leerogerfn:Sprint-2
Open

leerogerfn wants to merge 15 commits into
CodeYourFuture:mainfrom
leerogerfn:Sprint-2

Conversation

@leerogerfn

@leerogerfn leerogerfn commented Nov 14, 2026 •

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

completed exercise of Data Group Sprint-2

Questions

The PR required us do not upload the files of jest (package.json). When I create the push request. I need to delete those file. But when volunteer request us to made some changes on my work. I have to install the jest again. Do there have some ways to avoid me repeating such steps? Thank you.

@github-actions

This comment has been minimized.

@leerogerfn leerogerfn added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Data-Groups The name of the module. labels Nov 14, 2026
@github-actions

This comment has been minimized.

1 similar comment
@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 Nov 14, 2026
@github-actions

This comment has been minimized.

@leerogerfn leerogerfn changed the title London | 26-ITP-Sept | Fung Nin Lee | Sprint-2 | Data Group Sprint-2 London | 26-ITP-Sept | Fung Nin Lee | Sprint-2 | Data Group Nov 14, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@leerogerfn leerogerfn changed the title London | 26-ITP-Sept | Fung Nin Lee | Sprint-2 | Data Group London | 26-ITP-Sept | Fung Nin Lee | Sprint 2 | Data Group Nov 14, 2026
@leerogerfn leerogerfn added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 14, 2026
@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 thread Sprint-2/implement/querystring.js Outdated
Comment on lines +16 to +17
"+",
" "

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 does the second + become for an input like name=Ana+Maria+Garcia?

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

Comment thread Sprint-2/implement/querystring.js Outdated
Comment on lines +19 to +21
const value = decodeURIComponent(pair.slice(pair.indexOf("=") + 1)).replace(
"+",
" "

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How should an encoded literal plus such as %2B differ from a + used to represent a space? Trace how the value is decoded and then replaced here.

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

Comment thread Sprint-2/implement/tally.test.js Outdated
Comment on lines +41 to +49
expect(() => tally().toThrow("tally requires an array"));
});

test("throw error for 10", () => {
expect(() => tally(10).toThrow("tally requires an array"));
});

test("throw error for ''", () => {
expect(() => tally().toThrow("tally requires an array"));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Where is .toThrow(...) invoked in these expectations, and does Jest run an assertion? The same pattern appears in all three invalid-input tests.

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

Comment thread Sprint-2/implement/querystring.js Outdated
Comment on lines +10 to +12
if (!pair.includes("=") && pair.length > 0) {
queryParams[pair] = "";
continue;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

When a bare key such as %24half reaches this branch, is it decoded the same way as a key before =?

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

Comment thread Sprint-2/implement/querystring.js Outdated
return queryParams;
}

console.log(parseQueryString("full+name=John+Doe"));

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 output appears when another module imports this parser?

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

Comment thread Sprint-2/debug/address.js
Comment on lines +3 to +4
//The function intent to return houseNumber. However, console.log should locate the key
//instead of index. function will return error before fix.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

When the original address[0] expression runs, does it throw an error or produce a value?

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

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.

I don't understand what you need. object elements supposed to be accessed by key instead of index.

Comment thread Sprint-2/debug/recipe.js
@@ -1,4 +1,5 @@
// Predict and explain first...
// Ingredients will return the whole recipe before fix.

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 does JavaScript render for ${recipe} when recipe is an object?

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

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.

SyntaxError: missing ) after argument list

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

@leerogerfn leerogerfn 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 Nov 17, 2026
@hackertainment hackertainment added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 21, 2026

@hackertainment hackertainment left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The code looks ok to me, and only minor issues were found. Please fix them and keep it up as well. Thank you.

Comment thread Sprint-2/debug/author.js

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

While your fix produces a correct result, you have also changed the program logic completely. The original algorithm is using a for-of loop and your version is using built-in function. Can you think of a better fix which at least keeping the for loop structure?

});

// Given a value that isn't an object - an array, a string, a number,
// null, or no argument at all

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All 4 test cases below are correct. How about the test case for "no argument"? Please add it as well. Thank you.

Comment on lines +40 to +42
test("throw error for 'It is a string'", () => {
expect(() => tally()).toThrow("tally requires an array");
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hmm... please check this test case carefully. If you need a hint, please feel free to let me know. Thank you.

Comment on lines +12 to +14
test("inverting object with either key or value is empty", () => {
expect(invert({ "": 1, b: "" })).toEqual({ 1: "", "": "b" });
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Interesting test case, very good!

@hackertainment hackertainment added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Nov 21, 2026
@leerogerfn leerogerfn 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 Nov 23, 2026
@hackertainment

Copy link
Copy Markdown

Well done. You have completed this PR successfully. Please keep it up.

@hackertainment hackertainment 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 Nov 23, 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. Module-Data-Groups The name of the module. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants