mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Add quickjs-2021-03-27 to third_party
This commit is contained in:
parent
f40f97bd07
commit
1fbfbb3192
67 changed files with 99832 additions and 0 deletions
10
third_party/quickjs/examples/fib_module.js
vendored
Normal file
10
third_party/quickjs/examples/fib_module.js
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/* fib module */
|
||||
export function fib(n)
|
||||
{
|
||||
if (n <= 0)
|
||||
return 0;
|
||||
else if (n == 1)
|
||||
return 1;
|
||||
else
|
||||
return fib(n - 1) + fib(n - 2);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue