Function doesn't return value?

Does any know why is my helper function not returning anything, it keeps showing up “undefined”.

I am recalling the helper function if the number is more than 1 digits and if the number is only 1 digit then the function should just return some value.

Here is my code:

function persistence(num) {
  let numOfTimesToMultiply = 0;

  const multiplyHelper = (multiplyNum) => {
    if (multiplyNum.toString().length === 1) {
      // If the number is only 1 degit it should return "numOfTimesToMultiply" value
      return numOfTimesToMultiply;
    } else {
      // If the number is more than 1 degits, run below codes   
      const multiplyNumArray = multiplyNum
        .map((indivMultiplyNum) => parseInt(indivMultiplyNum));
      const totalNumber = multiplyNumArray.reduce((totalNum, indivNum) => {
        totalNum *= indivNum;
        return totalNum;
      // and call the helper function again       
  // Should console log number 3   


what you are doing with this value?

?? Sorry, I still don’t quite get it :pensive:
I thought even though the number becomes only 1 digit, it’ll still call itself again but when the function gets here

if (multiplyNum.toString().length === 1) {
  return numOfTimesToMultiply;

it will stop running the function and return the “numOfTimesToMultiply” value.

but what are you doing with the value returned from this?

this function call returns a vale but you are not collecting it in any way