Merge pull request #1 from Florent-V/Florent-V-patch-1

Update fibonacci.js
This commit is contained in:
Florent-Vasseur 2022-08-19 17:14:06 +02:00 committed by GitHub
commit 4b93ff8219
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -4,9 +4,7 @@ const fibonacci = function(count) {
let a = 0;
let b = 1;
for (let i = 1; i < count; i++) {
const temp = b;
b = a + b;
a = temp;
[a, b] = [b, a+b]
}
return b;
};