--- id: 5d792539728d1aa7788e2c9b title: Part 130 challengeType: 0 dashedName: part-130 --- # --description-- Unfortunately, `sort` not only returns a new array, but also modifies the existing one. So our function also modifies the array passed to it - it is impure. You can fix this by adding `.slice()` between `nums` and `sort` - this creates a new array, that is equivalent to `nums`, but is immediately discarded, so it doesn't matter if it changes. # --hints-- See description above for instructions. ```js assert( /constmedian=nums=>\{constsorted=nums\.slice\(\)\.sort\(\((.+),(.+)\)=>\1-\2\)/.test( code.replace(/\s/g, '') ) ); ``` # --seed-- ## --before-user-code-- ```html