source: imaps-frontend/node_modules/reusify/benchmarks/fib.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 177 bytes
Line 
1'use strict'
2
3function fib (num) {
4 var fib = []
5
6 fib[0] = 0
7 fib[1] = 1
8 for (var i = 2; i <= num; i++) {
9 fib[i] = fib[i - 2] + fib[i - 1]
10 }
11}
12
13module.exports = fib
Note: See TracBrowser for help on using the repository browser.