JavaScript solution
\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar maximumProduct = function(nums) {\n    nums = nums.sort((a,b) => b-a)\n    return Math.max(nums[
```\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar maximumProduct = function(nums) {\n    nums = nums.sort((a,b) => b-a)\n    return Math.max(nums[0]*nums[1]*nums[2], nums[nums.length-1]*nums[nums.length-2]*nums[0])\n};\n```
['Sorting', 'JavaScript']