Skip to content

London | ITP-JAN-2026 | Said Fayaz Sadat | Sprint 1 | coursework/sprint 1#980

Open
fayaz551 wants to merge 5 commits intoCodeYourFuture:mainfrom
fayaz551:coursework/Sprint-1
Open

London | ITP-JAN-2026 | Said Fayaz Sadat | Sprint 1 | coursework/sprint 1#980
fayaz551 wants to merge 5 commits intoCodeYourFuture:mainfrom
fayaz551:coursework/Sprint-1

Conversation

@fayaz551
Copy link

@fayaz551 fayaz551 commented Mar 5, 2026

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

completed the tasks of sprint-1 of data groups wrote the implementation and jest tests for the functions.

Questions

n/a

@fayaz551 fayaz551 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 6, 2026
@JaypeeLan JaypeeLan 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 Mar 11, 2026

// Filter only real numbers
const numbers = list.filter(
(item) => typeof item === "number" && !isNaN(item)

Choose a reason for hiding this comment

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

Number.isFinite(item)

Read about isFinite method. It is a btter way to check.


// Filter only numeric values
const numbers = elements.filter(function (item) {
return typeof item === "number" && !isNaN(item);

Choose a reason for hiding this comment

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

read about isFinite, and implement it here.

}

// Otherwise, return the largest number
return Math.max.apply(null, numbers);

Choose a reason for hiding this comment

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

This works, but ES6 is more readable.

Read about rest and spread, and update this line of your code.

@JaypeeLan JaypeeLan 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 Mar 11, 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