X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=fibonacci.mjs;h=a2fcd24ac4303ae2c6c5c4ed376d4729cf85f6ac;hb=1b4e2f913afc4f5dfed823720d89dde05d23d184;hp=3929b4d01cafe311f7ee768ae8a98ee2a8d09901;hpb=06fc1e2f5520c262e29cb0c3a428b7912fec86f7;p=benchmarks-js.git 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 }