Scala compact solution
\n# Code\n\nobject Solution {\n    def separateDigits(nums: Array[Int]): Array[Int] = {\n        nums.mkString.map(_.asDigit).toArray\n    }\n}\n
\n# Code\n```\nobject Solution {\n    def separateDigits(nums: Array[Int]): Array[Int] = {\n        nums.mkString.map(_.asDigit).toArray\n    }\n}\n```
['Scala']