You are viewing a single comment's thread. Return to all comments →
JavaScript:
function findMedian(arr) { return [...arr].sort((a, b) => a - b)[Math.floor(arr.length / 2)]; }
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Median
You are viewing a single comment's thread. Return to all comments →
JavaScript: