London | 26-ITP-May | Mandip Sanger| Sprint-1| Course work - #1392
London | 26-ITP-May | Mandip Sanger| Sprint-1| Course work#1392mandipsanger wants to merge 8 commits into
Conversation
LonMcGregor
left a comment
There was a problem hiding this comment.
This all looks good, just one minor thing in dedupe
| @@ -1 +1,8 @@ | |||
| function dedupe() {} | |||
| function dedupe(arr) { | |||
| return [...new Set(arr)]; | |||
|
|
||
| module.exports = dedupe; | ||
|
|
||
| console.log(dedupe(["a", "a", "a", "b", "b", "c"])); // ['a', 'b', 'c'] |
There was a problem hiding this comment.
Are these test cases? Can you move them to the appropriate place?
| return -Infinity; | ||
| } | ||
| const sorted = [...numbersOnly].sort((a, b) => a - b); | ||
| const max = sorted[sorted.length - 1]; |
There was a problem hiding this comment.
This is an interesting approach - sorting is a good solution
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Sprint part (Sprint-1) doesn't match expected format (example: 'Sprint 2', without quotes) 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. |
1 similar comment
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Sprint part (Sprint-1) doesn't match expected format (example: 'Sprint 2', without quotes) 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. |
Learners, PR Template
Self checklist
Changelist
completed sprint 1 course work
Questions
N/A