js simple solution
\n\n\n/**\n * @param {number[]} nums\n * @return {number[]}\n */\nvar separateDigits = function(nums) {\n    const array=nums.toString().split(\'\').join()\n   
\n\n```\n/**\n * @param {number[]} nums\n * @return {number[]}\n */\nvar separateDigits = function(nums) {\n    const array=nums.toString().split(\'\').join()\n    const array1=array.replace(/,/g,\'\').split(\'\').map(Number)\n    return array1\n};\n```
['JavaScript']