Ported 'countdown.js' to PhantomJS 1.2

1.2
Ivan De Marino 2011-06-01 14:25:22 +01:00
parent b91f5b9632
commit 811c56b6f3
1 changed files with 9 additions and 8 deletions

View File

@ -1,8 +1,9 @@
var t = 10; var t = 10,
while (t > 0) { interval = setInterval(function(){
console.log(t); if ( t > 0 ) {
phantom.sleep(1000); console.log(t--);
t = t - 1; } else {
} console.log("BLAST OFF!");
console.log('BLAST OFF'); phantom.exit();
phantom.exit(); }
}, 1000);