For this Question: Complete the function <code>getValue()</code> which takes one argument which is a number.
The function is a recursive function means it calls itself if a certain condition is met.
The function can take any positive whole number and will return a single-digit positive whole number from their recursive sum.

For example, if the input number is 7893
then 7+8+9+3=27(27 is not single digit number so we will add its digits again)
then 2+7=9
The function will return 9 as output.The function will take a positive whole number as input.The output will be the repeated sum of digits until there is only a single digit in the numberconst answer= getValue(456);
console.log(answer);
//prints 6 (4+5+6=15, then 1+5=6)
, I have written this Solution Code: const getValue = (num) => {
  let numberX = num;
  num = 0;
  while (numberX > 0) {
    num = num + (numberX % 10 | 0);
    numberX = numberX / 10;
  }
  if (num < 10) {
    return num;
  } else {
    return getValue(num);
  }
};
, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?