For this Question: Given a number N, find the sum of all the digits of the number

Note: Use a recursive method to solve this problem.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>Sum()</b> that takes the integer N as a parameter.

Constraints: 
1 ≤ T ≤ 100
0 ≤ N ≤ 1000000000Return sum of digits.Sample Input 
2
25
28

Sample Output 
7
10, I have written this Solution Code:  // n is the input number
    function recSum(n) {
        // write code here
        // do not console.log
        // return the answer as a number

        if (n < 10) return n;

        return n % 10 + recSum(Math.floor(n / 10))
    }
, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?