Skip to content

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

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

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

Conversation

@mjm-git185
Copy link
Copy Markdown

@mjm-git185 mjm-git185 commented Mar 4, 2026

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
Comment thread Sprint-1/implement/max.js
Copy link
Copy Markdown

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"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

hi I've been working on this but i'm having some trouble with the number.isFinite would you be free at some point tomorrow to go over it please

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You could book a pair programming session.
Before then, try to read this:
https://www.w3schools.com/jsref/jsref_isfinite_number.asp

You just need to replace that check, but you need to know why you are doing it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi sorry i didn't get to you sooner i had some blockers to deal with

@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
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 15, 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. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 15, 2026
@mjm-git185
Copy link
Copy Markdown
Author

Was there any other changed needed

@mjm-git185
Copy link
Copy Markdown
Author

hi JaypeeLan is there anything else that i need to do for this PR

@JaypeeLan
Copy link
Copy Markdown

hi JaypeeLan is there anything else that i need to do for this PR

This branch has conflicts that must be resolved

@mjm-git185
Copy link
Copy Markdown
Author

i think thats it

@mjm-git185 mjm-git185 requested a review from JaypeeLan March 25, 2026 23:46
@JaypeeLan JaypeeLan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Mar 26, 2026
@mjm-git185
Copy link
Copy Markdown
Author

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants