X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=node_modules%2Fphantomjs-prebuilt%2Flib%2Fphantom%2Fexamples%2Ffibo.js;fp=node_modules%2Fphantomjs-prebuilt%2Flib%2Fphantom%2Fexamples%2Ffibo.js;h=7ee472a99256f29ef0b5c2b51e4354da9ddcde70;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/node_modules/phantomjs-prebuilt/lib/phantom/examples/fibo.js b/node_modules/phantomjs-prebuilt/lib/phantom/examples/fibo.js new file mode 100644 index 000000000..7ee472a99 --- /dev/null +++ b/node_modules/phantomjs-prebuilt/lib/phantom/examples/fibo.js @@ -0,0 +1,10 @@ +"use strict"; +var fibs = [0, 1]; +var ticker = window.setInterval(function () { + console.log(fibs[fibs.length - 1]); + fibs.push(fibs[fibs.length - 1] + fibs[fibs.length - 2]); + if (fibs.length > 10) { + window.clearInterval(ticker); + phantom.exit(); + } +}, 300);