[oden] Grab my incomplete QuickJS wrapper
This commit is contained in:
parent
aa70df41a3
commit
898b1fe129
114 changed files with 244181 additions and 0 deletions
10
oden-js-sys/quickjs/examples/fib_module.js
Normal file
10
oden-js-sys/quickjs/examples/fib_module.js
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