Commit 8c2e479f authored by Stefanie Hasler's avatar Stefanie Hasler

working

parent 75702782
......@@ -7,13 +7,7 @@ function fibonacci(n: number): number {
if (n === 1) {
return 1
}
if (n > 5) {
return 5 + 3
}
if (n < 5) {
return n - 1
}
return n
return fibonacci(n - 1) + fibonacci(n - 2)
}
//0, 1, 1, 2, 3, 5, 8, 13, 21, 34,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment