Solution with Javascript
Code\njavascript []\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar findValueOfPartition = function(nums) {\n    nums.sort((a, b) => a -  b);\n  
# Code\n```javascript []\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar findValueOfPartition = function(nums) {\n    nums.sort((a, b) => a -  b);\n    let min = Number.POSITIVE_INFINITY;\n    for (let i = 1; i < nums.length; i++) {\n        if (Math.abs(nums[i] - nums[i-1]) < min) min = Math.abs(nums[i] - nums[i-1]);\n    }\n    return min;\n};\n```
['JavaScript']