--- id: 5d792539b2e0bd8f9e8213e4 title: Part 133 challengeType: 0 dashedName: part-133 --- # --description-- Use the ternary operator to return `average([sorted[middle], sorted[middle + 1]])` if `length` is even, and `sorted[middle + 0.5]` otherwise. Note that the `middle` variable is close to the middle but is not actually the middle. # --hints-- See description above for instructions. ```js assert(median([1, 20, 3]) === 3 && median([27, 7, 20, 10]) === 15); ``` # --seed-- ## --before-user-code-- ```html Spreadsheet
``` ## --after-user-code-- ```html ``` ## --seed-contents-- ```html ``` # --solutions-- ```html ```