Skip to content

Commit 97991c0

Browse files
committed
Fibonacci gelöst
1 parent 0f387f3 commit 97991c0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/exercises/fibonacci.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ function fibonacci (anzahlElemente){
77

88
for (let i = 2; fibonacciArr.length < anzahlElemente; i++) {
99
console.log(i)
10+
// Addiere die zahlen von fiboarray[index (letzte zahl)] + fiboarray[index (zweitletzte zahl)]
1011
fibonacciArr.push(fibonacciArr[i-2] + fibonacciArr[i-1])
1112
}
1213
return fibonacciArr

0 commit comments

Comments
 (0)