Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
REMitchell
GitHub Repository: REMitchell/python-crawling
Path: blob/master/6-Selenium/phantomjs/examples/fibo.js
164 views
1
var fibs = [0, 1];
2
var ticker = window.setInterval(function () {
3
console.log(fibs[fibs.length - 1]);
4
fibs.push(fibs[fibs.length - 1] + fibs[fibs.length - 2]);
5
if (fibs.length > 10) {
6
window.clearInterval(ticker);
7
phantom.exit();
8
}
9
}, 300);
10
11