--- id: 5d7925399afb905c34730a75 title: Part 129 challengeType: 0 dashedName: part-129 --- # --description-- But our function takes an array of numbers, not strings. Luckily, you can pass a function `fn` as argument to sort: ```js [2, 9, 10, 15].sort((a, b) => b - a); // [10, 9, 5, 2] ``` If `b - a` is less than 0, then `a` will be placed before `b`. As a result, this sorts the array in descending order. Use `sort` to sort `nums` in ascending order. # --hints-- See description above for instructions. ```js assert( /constmedian=nums=>\{constsorted=nums\.sort\(\((.+),(.+)\)=>\1-\2\)/.test( code.replace(/\s/g, '') ) ); ``` # --seed-- ## --before-user-code-- ```html Spreadsheet
``` ## --after-user-code-- ```html ``` ## --seed-contents-- ```html ``` # --solutions-- ```html ```