function fibo(num) {
if(num == 0) {
return 0;
} else if(num == 1) {
return 1;
} else {
return fibo(num-1) + fibo(num-2);
}
}
This is my code to resolve fibonacci in javascript, but I do fibo (50) it hangs. I have been researched about the memo and how to apply it in recursive functions, but I still do not understand could you help me?