Javascript – How to return the right array for f(0), tail-call optimized Fibonacci?
I'm studying recursion and I'm trying to make a tail-call optimized Fibonacci which returns an array of Fibonacci numbers up to the argument passed. The problem I am encountering is with Fibonacci of 0, which should return [0], but now…