London | 26-ITP-May | Dipa Sarker | Sprint 1| Sprint-1-exercises - #1244
London | 26-ITP-May | Dipa Sarker | Sprint 1| Sprint-1-exercises#1244Dipa-Sarker wants to merge 9 commits into
Conversation
LonMcGregor
left a comment
There was a problem hiding this comment.
Good start, but some areas where you could improve
There was a problem hiding this comment.
Did you run the tests for this file? When I run it, I get a failure, do you also get this?
There was a problem hiding this comment.
I am extremely sorry that may be by mistakenly I did not complete the function for all the test cases and forgot to run the test file. Now, I completed all the functions for the test cases.
| @@ -1 +1,10 @@ | |||
| function dedupe() {} | |||
| function dedupe(array) { | |||
| const result = []; | |||
There was a problem hiding this comment.
Are all the lines of code in this function necessary for it to work? Could it be simplified?
There was a problem hiding this comment.
I think there is no need to const result = []; I removed this line and added return []; directly inside the if condition.
|
Great, task is complete |
Learners, PR Template
Self checklist
Changelist
Completed the Sprint 1 tasks across the Fix, Implement and Refactor sections.
Implemented functions according to the provided requirements:
maxsumdedupeAdded/verified functionality against the corresponding test cases and checked behavior with different inputs.
Testing
npm test -- fixnpm test -- implement