This repository has been archived on 2024-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
fediversity.eu/node_modules/reusify/benchmarks/fib.js
2024-03-26 16:28:28 +01: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