Ad
  • Custom User Avatar

    That's because the dirReduc(arr) there is not returned, so the function didn't return anything and therefore results in undefined.