const getMedian = (array) => {
const sorted = array.sort((a, b) => a - b);
const median = array.length % 2 === 0
? (sorted[sorted.length / 2 - 1] + sorted[sorted.length / 2]) / 2
: sorted[Math.floor(sorted.length / 2)];
}
And it doesn’t pass. Instead I get this message:

If the array.length is even, your median variable should use the getMean function to calculate the mean of the two middle numbers. Your first argument should be the value of sorted at array.length / 2 , and the second at array.length / 2 - 1 .

How is it possible to use getMean with 2 arguments since it only one array as an argument?

I was stuck on this for a long time. You do need to pass it an array but it also needs to be in parenthesis. In case this helps anyone else get unstuck