JavaScript - Quicksort
\n/**\n * @param {number[]} nums\n * @return {number[]}\n */\nvar sortArray = function(nums) {\n    if (nums.length <= 1) return nums;\n    const pivot = nums.p
```\n/**\n * @param {number[]} nums\n * @return {number[]}\n */\nvar sortArray = function(nums) {\n    if (nums.length <= 1) return nums;\n    const pivot = nums.pop();\n    const less = sortArray(nums.filter(n => n <= pivot));\n    const more = sortArray(nums.filter(n => n > pivot));\n    return less.concat(pivot, more);\n};\n```
['JavaScript']