Skip to content

Conversation

@hamdiheb
Copy link
Owner

@hamdiheb hamdiheb commented Jan 11, 2026

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

return listnumberOrdered[pos];
}
else{
return listnumberOrdered[pos-1]+0.5;
Copy link

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'];
Copy link

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 @@
{
Copy link

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) {
Copy link

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');
Copy link

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];
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants