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

9 lines
126 B
JavaScript
Raw Permalink Normal View History

2023-04-12 14:21:03 +00:00
function fib(n) {
if(n < 2) {
return n;
}
return fib(n-1) + fib(n-2)
}
console.log(fib(process.argv[2]))