You must hand in by using git
bitbucket.org,
gitlab.com, or
github.com,
git push your local repo to the above remote repo.
node_modules/
.gitignore file.
Send a mail to <nmla@iba.dk> with:
handin <subjectname>'
in the subject line of your mail
There is a mathematical koncept, factorial, important in
probability and statistics. The definition of n!:
n! = n * (n-1) * (n - 2) * ... * 2 * 1
There is a genuinely recursive definition that is, perhaps, more elegant:
n! = n * (n - 1)!
Write a recursive function fact(n) that calculates
the factorial of a given natural number n.
Document it with a couple of testcases.
Place the function in myRecurseLib.js.
There is a mathematical koncept, Fibonacci numbers, important in
various contexts eg closely related to calculating the golden
ratio. The definition of the n-th Fibonacci number
Fn:
F0 = 0; F1 = 1;
and:
Fn =
Fn-1 + Fn-2
Write a recursive function fibo(n) that calculates
the n-th Fibonacci number.
Document it with a couple of testcases.
Save the function in myRecurseLib.js.