JavaScript MergeSort Solution
\nconst sortArray = nums => {\n    if(nums.length <= 1) return nums\n    \n    const middle = Math.floor(nums.length / 2)\n    const left = nums.slice(0, middle
```\nconst sortArray = nums => {\n    if(nums.length <= 1) return nums\n    \n    const middle = Math.floor(nums.length / 2)\n    const left = nums.slice(0, middle)\n    const right = nums.slice(middle)\n    \n    return merge(sortArray(left), sortArray(right))\n};\n\nconst merge = (left, right) => {\n    const result = []\n    \n    while (left.length && right.length) {\n        if(left[0] <= right[0]) {\n            result.push(left.shift())\n        } else {\n            result.push(right.shift())\n        }\n    }\n    \n    return [...result, ...left, ...right]\n}\n```
['Merge Sort', 'JavaScript']