
var n = 45;

function fib(n) {
    if (n == 1 || n == 2) return 1;
    return fib(n - 1) + fib(n - 2);
}

// function fib2(n, ret1, ret2) {
//     if (n == 0) return ret1;
//     return fib2(n - 1, ret2, ret1 + ret2);
// }

var a = new Date().valueOf();

fib(40);

console.log(new Date().valueOf() - a)
