Reaction test
Click on the green box as quickly as you can. Your reaction time will be posted below:
Your Reaction Time is:
let e=window.innerWidth-50,t=window.innerHeight-50,n=new Date;const o=document.getElementById("block");o.addEventListener("click",(function(){document.getElementById("reaction").textContent=(new Date-n)/1e3+" sec",o.style.display="none",o.style.left=e*Math.random()+"px",o.style.top=t*Math.random()+"px";const i=1e3*(3*Math.random()+2);setTimeout((function(){o.style.display="block",n=new Date}),i)})),window.addEventListener("resize",(function(i){e=window.innerWidth-50,t=window.innerHeight-50,console.clear(),console.log("maxLeftPosition",e,"maxTopPosition",t),o.style.display="block",o.style.left="0px",o.style.top="0px",n=new Date}));
//# sourceMappingURL=reaction.js.map