phantomjs/examples/countdown.js

10 lines
212 B
JavaScript
Raw Permalink Normal View History

2011-06-01 17:25:22 +04:00
var t = 10,
interval = setInterval(function(){
if ( t > 0 ) {
console.log(t--);
} else {
console.log("BLAST OFF!");
phantom.exit();
}
}, 1000);