Birmingham | 26-ITP-May | Tobias Amaechina | Sprint 1 | Group data sprint 1 - #1283
Open
Tobias-Amaechina wants to merge 38 commits into
Open
Birmingham | 26-ITP-May | Tobias Amaechina | Sprint 1 | Group data sprint 1#1283Tobias-Amaechina wants to merge 38 commits into
Tobias-Amaechina wants to merge 38 commits into
Conversation
…all --save-dev jest && npm audit fix
…ores non-numerical values
… that it returns -Infinity
… it returns that number
…er were passed that it reurns the largest numer overall
…e one closest to zero
…om given array of decimal numbers
…oring non-numeric value when given an array of both numeric and non-numeric values
…at it returns the least surprising value which is -Infinity
…ty array is passed to the function
… number is passd into the function
…er is passed into a sum fn
…ve numbers are passed into the sum fn
…oth positive and negative are passed to the sum function
…ignore the non-numerical values when give array of both numeric and non-numeric values
…merical value and numerical values as pass as array into the fn
…ray of non-number values are given
hey-hammad
suggested changes
Jul 28, 2026
hey-hammad
left a comment
There was a problem hiding this comment.
@Tobias-Amaechina please fix the failing test cases. Thanks
…data that are stricly numbers
Author
|
Thanks for the feed back , all test has now passed |
hey-hammad
suggested changes
Jul 29, 2026
hey-hammad
left a comment
There was a problem hiding this comment.
Good clean code overall, once minor change required.
| @@ -1,12 +1,12 @@ | |||
| // Refactor the implementation of includes to use a for...of loop | |||
There was a problem hiding this comment.
please read the instruction for this exercise again.
Author
There was a problem hiding this comment.
Thank you for the feedback, the function has been refactored to include for .. of loop .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
Sprint-1/fix/median.js
I Validated input and handle non-array input.
Convert numeric strings to numbers and ignore non-numeric values.
Sort numeric values and return correct median for odd/even lengths.
Return null when there are no numeric values.
Sprint-1/implement/dedupe.js
I Implemented dedupe using Set to remove duplicates and return unique elements.
Sprint-1/implement/dedupe.test.js
Replaced todo with unit tests for empty arrays, arrays without duplicates, and arrays with duplicates (strings and numbers).
Sprint-1/implement/max.js
Implemented findMax: filter numeric values then return Math.max(...) (ignores non-numeric values).
Sprint-1/implement/max.test.js
Replaced todo with multiple unit tests covering empty arrays, single value, negatives, decimals, mixed types, and only-non-number cases.
Sprint-1/implement/sum.js
Implemented sum: filter numeric values, reduce, and normalize floating point with toFixed(10).
Sprint-1/implement/sum.test.js
Replaced todo with tests for empty, single, negative, decimal, mixed and only-non-number arrays.
Sprint-1/refactor/includes.js
Minor refactor: renamed parameter to array and used index-based loop; behavior preserved.
Sprint-1/package-lock.json
Updated many dev dependency versions (package-lock updated — likely from npm install / dependency updates).
Brief explanation