repositories
/
benchmarks-js.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06fc1e2
)
refactor: cleanups
author
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Thu, 28 Mar 2024 16:56:12 +0000
(17:56 +0100)
committer
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Thu, 28 Mar 2024 16:56:12 +0000
(17:56 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
fibonacci.mjs
patch
|
blob
|
blame
|
history
diff --git
a/fibonacci.mjs
b/fibonacci.mjs
index 3929b4d01cafe311f7ee768ae8a98ee2a8d09901..a2fcd24ac4303ae2c6c5c4ed376d4729cf85f6ac 100644
(file)
--- a/
fibonacci.mjs
+++ b/
fibonacci.mjs
@@
-25,9
+25,9
@@
function fibonacciLoopWhile (num) {
let current = 1
let previous = 0
while (--num) {
- const t
e
mp = current
+ const tmp = current
current += previous
- previous = t
e
mp
+ previous = tmp
}
return current
}