refactor: cleanups
[benchmarks-js.git] / fibonacci.mjs
index 00130ce0709a7e33a6abb23ba24bbed6fcfcbb8b..a2fcd24ac4303ae2c6c5c4ed376d4729cf85f6ac 100644 (file)
@@ -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
 }
@@ -76,6 +76,4 @@ Benchmark.suite(
   Benchmark.save({ file: 'fibonacci', format: 'json', details: true }),
   Benchmark.save({ file: 'fibonacci', format: 'chart.html', details: true }),
   Benchmark.save({ file: 'fibonacci', format: 'table.html', details: true })
-).catch(err => {
-  console.error(err)
-})
+).catch(console.error)