Coderslang_Master Ok, since i cannot edit that message anymore, i will just copy.
So the function returns factorial of the number, but i cannot pass through third check of this task.
export const factorial = (n) => {
if (n === 0) {
return 0;
} else {
let fact = 1;
while (n > 0) fact *= n--;
return fact;
}
};
1.factorial should be exported from the file helper.js
2factorial should be a function
3.The function factorial should return the factorial of the number'