BlueGit

blue-star danique-bot

Files

danique-bot / node_modules / phantomjs-prebuilt / lib / phantom / examples / fibo.js

fibo.js

Import template
timfa Tim · pushed by timfa · 4 years ago
c788ad20 History
fibo.js 286 B Download Raw
1"use strict";
2var fibs = [0, 1];
3var ticker = window.setInterval(function () {
4 console.log(fibs[fibs.length - 1]);
5 fibs.push(fibs[fibs.length - 1] + fibs[fibs.length - 2]);
6 if (fibs.length > 10) {
7 window.clearInterval(ticker);
8 phantom.exit();
9 }
10}, 300);