SOURCE

var t = 0.05;
var year = 20;
function fn(y){
    if (y == 1) return 10000;
    return t * fn(y-1)
 }

 console.log(fn(20));
console 命令行工具 X clear

                    
>
console