Birmingham | 26-ITP-May | Ogbemi Mene | Sprint 1 | Module data group/sprint 1#1254
Birmingham | 26-ITP-May | Ogbemi Mene | Sprint 1 | Module data group/sprint 1#1254meneogbemi42-bit wants to merge 18 commits into
Conversation
LonMcGregor
left a comment
There was a problem hiding this comment.
Good start, but I have a few comments.
Also, Did you remember to write some test cases for the "implement" tasks?
| return null; | ||
| } | ||
| const numbersOnly = list.filter(element => typeof element === 'number'); | ||
| //console.log (numbersOnly); |
There was a problem hiding this comment.
If this code isn't needed, remove commented out parts completely
| //return median; | ||
| } | ||
|
|
||
| const salaries = [10, 40, 50, 70, 90] |
There was a problem hiding this comment.
If you have test files, put the tests into those ones rather than leaving them in the main file
| return []; | ||
| } | ||
|
|
||
| return [...new Set(list)]; |
| if (numbersOnly.length === 0) { | ||
| return -Infinity; | ||
| } | ||
| return Math.max(...numbersOnly); |
There was a problem hiding this comment.
Could you maybe try re-implementing this without using the built-in max function?
|
|
||
| const numbersOnly = elements.filter(item => typeof item === "number" && !isNaN(item)); | ||
|
|
||
| if (numbersOnly.length === 0) { |
There was a problem hiding this comment.
If you have 0 elements, do you need this if condition here?
Removed commented-out code and unnecessary return statement.
…gbemi42-bit/Module-Data-Groups into Module-data-Group/sprint-1
|
i have added all the test files needed |
|
The files changed in this PR don't match what is expected for this task. Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints. Please review the 'files changed' tab at the top of the page. Here is an example of a file that has been changed on this branch but shouldn't be: If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
The files changed in this PR don't match what is expected for this task. Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints. Please review the 'files changed' tab at the top of the page. Here is an example of a file that has been changed on this branch but shouldn't be: If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
The files changed in this PR don't match what is expected for this task. Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints. Please review the 'files changed' tab at the top of the page. Here is an example of a file that has been changed on this branch but shouldn't be: If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
This reverts commit 9d5a0fe.
Self checklist
This PR is about implementing and fixing array manipulation functions as part of a Sprint 1 coding exercise.