mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-10 11:09:43 +08:00
Merge f197a5bf49
into ca3d16dcce
This commit is contained in:
commit
420cc7a342
@ -10,10 +10,6 @@ export default function fibonacci(n) {
|
|||||||
let currentValue = 1;
|
let currentValue = 1;
|
||||||
let previousValue = 0;
|
let previousValue = 0;
|
||||||
|
|
||||||
if (n === 1) {
|
|
||||||
return fibSequence;
|
|
||||||
}
|
|
||||||
|
|
||||||
let iterationsCounter = n - 1;
|
let iterationsCounter = n - 1;
|
||||||
|
|
||||||
while (iterationsCounter) {
|
while (iterationsCounter) {
|
||||||
|
Loading…
Reference in New Issue
Block a user