Skip to content

Glasgow | 26-ITP-Jan| Martin McLean |Sprint 1| coursework#978

Open
mjm-git185 wants to merge 6 commits intoCodeYourFuture:mainfrom
mjm-git185:Sprint-1
Open

Glasgow | 26-ITP-Jan| Martin McLean |Sprint 1| coursework#978
mjm-git185 wants to merge 6 commits intoCodeYourFuture:mainfrom
mjm-git185:Sprint-1

Conversation

@mjm-git185
Copy link

Changelist

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
my coursework

@github-actions

This comment has been minimized.

@mjm-git185 mjm-git185 changed the title Sprint 1 Glasgow | 26-ITP-Jan| Martin McLean |Sprint | coursework Mar 4, 2026
@github-actions

This comment has been minimized.

@mjm-git185 mjm-git185 changed the title Glasgow | 26-ITP-Jan| Martin McLean |Sprint | coursework Glasgow | 26-ITP-Jan| Martin McLean |Sprint 1| coursework Mar 4, 2026
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 4, 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 12, 2026

Choose a reason for hiding this comment

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

This works, but there can be some improvements.
Check that elements is an array before calling .filter(), and do an early return if it is empty.
Sorting the entire array is unnecessary if you only need the maximum value.
Consider using Number.isFinite() to ensure only valid numbers are included, so no need for typeof element === "number"

@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 12, 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