JSFiddle - React, Tailwind, and code Playground
by obobruyko
JavaScript
var then = new Date();
then.setSeconds(then.getSeconds() + 10);
var now = new Date();
var thenSeconds = then.getSeconds();
var nowSeconds = now.getSeconds();
console.log(thenSeconds);
console.log(nowSeconds);
var nowNow;
while(thenSeconds >= (nowNow = new Date().getSeconds())) {
console.log(nowNow);
}