-
Notifications
You must be signed in to change notification settings - Fork 0
Barcelona | OCT-2025-2 | Iheb Hamdi | Sprint 1 | Data-Groups #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| return listnumberOrdered[pos]; | ||
| } | ||
| else{ | ||
| return listnumberOrdered[pos-1]+0.5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's correct. What is a median of [1, 10] for example?
| // Then it should return an empty array | ||
| test.todo("given an empty array, it returns an empty array"); | ||
| test("Empty Arrat", () => { | ||
| const list=['a','a','a','b','b','c']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it's not an empty array as the test says.
Can you fix the test names pls?
| @@ -0,0 +1,16 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to have multiple package.json files?
| @@ -1,9 +1,15 @@ | |||
| // Refactor the implementation of includes to use a for...of loop | |||
|
|
|||
| function includes(list, target) { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally you need tests for that
| @@ -1,4 +1,22 @@ | |||
| function sum(elements) { | |||
| const elementNumbers = elements.filter((element) =>typeof element === 'number'); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you think how to simplify the function?
| // When passed to the sum function | ||
| // Then it should return that number | ||
| test("One number array", () => { | ||
| const list = [7, 42, 0, 9]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is more than one number. Can you pls ensure that the test names align with their content?
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.