Skip to content

London | 26-ITP-May | Rizqah Popoola | Sprint 1 | Data Groups#1278

Open
risikatpopoola wants to merge 3 commits into
CodeYourFuture:mainfrom
risikatpopoola:data-group/sprint-1
Open

London | 26-ITP-May | Rizqah Popoola | Sprint 1 | Data Groups#1278
risikatpopoola wants to merge 3 commits into
CodeYourFuture:mainfrom
risikatpopoola:data-group/sprint-1

Conversation

@risikatpopoola

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

Changelist

This PR contains tasks involving implementing, fixing and refactoring arrays.

@risikatpopoola risikatpopoola added 🏕 Priority Mandatory This work is expected Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Data-Groups The name of the module. 📅 Sprint 1 Assigned during Sprint 1 of this module labels Jul 21, 2026
@risikatpopoola risikatpopoola 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 Jul 22, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 27, 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 work, some comments for improvements, but all tests pass

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Well done adding test cases

if (input.length === 0) {
return [];
}
for (const i in input)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do you need two nested loops here? Could this be simplified?

Comment thread Sprint-1/implement/sum.js
.filter((item) => typeof item === "number")
.sort((a, b) => a - b);
let sum = 0;
if (cleanElements.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.

Do you need to return if there are zero elements?

for (let index = 0; index < list.length; index++) {
const element = list[index];
for (const item of list) {
const element = item;

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 element constant do 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 27, 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. 🏕 Priority Mandatory This work is expected Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants