Skip to content

London | 26-ITP-Sep | Chandramani Gaire | Sprint 1 | Module-Data-Group - #1495

Open
gaireprakash20-ops wants to merge 12 commits into
CodeYourFuture:mainfrom
gaireprakash20-ops:Sprint-1
Open

gaireprakash20-ops wants to merge 12 commits into
CodeYourFuture:mainfrom
gaireprakash20-ops:Sprint-1

Conversation

@gaireprakash20-ops

@gaireprakash20-ops gaireprakash20-ops commented Nov 5, 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-1071

Changelist

i test and implement different function.

@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@gaireprakash20-ops gaireprakash20-ops added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 5, 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 Nov 5, 2026
@gaireprakash20-ops gaireprakash20-ops changed the title London | 26-ITP-Sep | Chandramani Gaire | Sprint-1 | Module-Data-Group London | 26-ITP-Sep | Chandramani Gaire | Sprint 1 | Module-Data-Group Nov 5, 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 5, 2026
@cjyuan cjyuan 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 6, 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.

  • Function implementations are all correct. Well done.

  • Regarding the PR description, could you use AI to research what should be included in the "Changelist" section of a PR, then revise your Changelist content accordingly?

  • You missed updating a file in the refactor sub-folder.

Comment on lines +23 to +32
// Given an array with no duplicates
// When passed to the dedupe function
// Then it should return a copy of the original array
it("returns a copy of the array when there are no duplicates", () => {
// const list = [1, 2, 3];
// const result = dedupe(list);
// expect(result).toEqual([1, 2, 3]);
// expect(result).not.toBe(list);
expect(dedupe([1, "1", 2])).toEqual([1, "1", 2]);
});

@cjyuan cjyuan Nov 6, 2026 •

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.

Your function implementation is correct. However, this test could be improved to better ensure
that any future changes continue to align with the expected behavior described on line 25:

Then it should return a copy of the original array

This test should fail if the function returns the original array (instead of a copy of the original array).

The current test checks only if both the original array and the returned array contain identical elements.
In order to validate the returned array is a different array, we need an additional check.

Could you find out what this additional check is?


Also, any unused code should be deleted instead of kept in 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.

What should calculateMean([Infinity, 0, -Infinity]) return, or how should the function behave?
The same also applies to sum().

Comment thread Sprint-1/implement/sum.js
Comment on lines +8 to +10
let Total = 0;
for (const value of elements) {
Total += value;

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.

Some of the variable names does not quite match JS naming convention.

@cjyuan cjyuan 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 6, 2026
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