Hi, inside the function fib, the condition should check if the input is less than or equal to 1, instead of equal to 0 and return n. for input 1 the current code returns 0 instead of 1.
correct code:
if (n <= 1)
return n;
Type your question above this line.
Course: https://www.educative.io/collection/10370001/5347133077061632
Lesson: https://www.educative.io/collection/page/10370001/5347133077061632/6732638071029760