orca/ext/wasm3/test/lang/fib.min.js

4 lines
80 B
JavaScript
Raw Normal View History

2023-04-12 14:21:03 +00:00
function fib(f){if(f<2)return f
return fib(f-1)+fib(f-2)}
console.log(fib(32));