Each time when i run this code I get the output but with that output I also get undefined What does that undefined indicates
function factorial(num) {
let final = 1;
function helper(no) {
if (no === 0) return;
if (no > 1) {
final *= no;
}
no--;
helper(no);
}
helper(num);
console.log(final);
}
factorial(5)