From: Jérôme Benoit Date: Thu, 28 Mar 2024 16:56:12 +0000 (+0100) Subject: refactor: cleanups X-Git-Url: https://git.piment-noir.org/?p=benchmarks-js.git;a=commitdiff_plain;h=1b4e2f913afc4f5dfed823720d89dde05d23d184 refactor: cleanups Signed-off-by: Jérôme Benoit --- diff --git a/fibonacci.mjs b/fibonacci.mjs index 3929b4d..a2fcd24 100644 --- a/fibonacci.mjs +++ b/fibonacci.mjs @@ -25,9 +25,9 @@ function fibonacciLoopWhile (num) { let current = 1 let previous = 0 while (--num) { - const temp = current + const tmp = current current += previous - previous = temp + previous = tmp } return current }