Skip to content

Birmingham | 26-ITP-May | Ogbemi Mene | Sprint 1 | Module data group/sprint 1#1254

Open
meneogbemi42-bit wants to merge 4 commits into
CodeYourFuture:mainfrom
meneogbemi42-bit:Module-data-Group/sprint-1
Open

Birmingham | 26-ITP-May | Ogbemi Mene | Sprint 1 | Module data group/sprint 1#1254
meneogbemi42-bit wants to merge 4 commits into
CodeYourFuture:mainfrom
meneogbemi42-bit:Module-data-Group/sprint-1

Conversation

@meneogbemi42-bit

Copy link
Copy Markdown

Self checklist

This PR is about implementing and fixing array manipulation functions as part of a Sprint 1 coding exercise.

@meneogbemi42-bit meneogbemi42-bit added 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 Jul 17, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 22, 2026

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

Good start, but I have a few comments.

Also, Did you remember to write some test cases for the "implement" tasks?

Comment thread Sprint-1/fix/median.js
return null;
}
const numbersOnly = list.filter(element => typeof element === 'number');
//console.log (numbersOnly);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If this code isn't needed, remove commented out parts completely

Comment thread Sprint-1/fix/median.js
//return median;
}

const salaries = [10, 40, 50, 70, 90]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If you have test files, put the tests into those ones rather than leaving them in the main file

return [];
}

return [...new Set(list)];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good use of a set!

Comment thread Sprint-1/implement/max.js
if (numbersOnly.length === 0) {
return -Infinity;
}
return Math.max(...numbersOnly);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could you maybe try re-implementing this without using the built-in max function?

Comment thread Sprint-1/implement/sum.js

const numbersOnly = elements.filter(item => typeof item === "number" && !isNaN(item));

if (numbersOnly.length === 0) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If you have 0 elements, do you need this if condition here?

@LonMcGregor LonMcGregor 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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Data-Groups The name of the module. 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