If array.length is even, pass an array with the two middle numbers from the sorted array to the getMean function. The first item in the array argument should be the value at index array.length / 2 from sorted and the second should use the value at the index array.length / 2 - 1 from sorted .

Right now you aren’t accessing the value of those indexes,rather you are sending the indexes themselves. How do you access the value at an index in an array?

const median = array.length % 2 === 0 ? getMean(sorted[array.length / 2], [array.length / 2 - 1]) : sorted[Math.floor(array.length / 2)];
I know that the getMean function receives an ordered array which is “sorted” but I can’t find a way to pass the data to sorted

You’re so close - remember that sorted is an array so all the ‘arguments’ to sorted should be arrays (you have 2 out of 3 there) but also that getMean is expecting an array

const median = array.length % 2 === 0 ? getMean(sorted[array.length / 2] , sorted[array.length / 2 - 1]): sorted[Math.floor(array.length / 2)];
I tried this logic but I don´t know if I’m broking more my code.