Lobashov_Ivan_PIBD-21_IP/Lab2/node_modules/.reusify-3BC5daZl/benchmarks/fib.js
2024-01-10 22:39:31 +04: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