www_hero/node_modules/reusify/benchmarks/fib.js
sasha-astiadi 324d5960af hero_web
2024-05-03 06:39:20 +02:00

14 lines
177 B
JavaScript

'use strict'
function fib (num) {
var fib = []
fib[0] = 0
fib[1] = 1
for (var i = 2; i <= num; i++) {
fib[i] = fib[i - 2] + fib[i - 1]
}
}
module.exports = fib