OneCompiler

find fibonacci squence using recursion in js

1619

Example heading with h2 size

Example heading with h3 size

Following is sample java code.


function fib(n){
    if(n<2){
        return n
    }
    return fib(n-1)+fib(n-2)
}
console.log(fib(10))