인프런 커뮤니티 질문&답변
두개의 차이가 뭔가요??
작성
·
222
0
cancleTime = setTimeout(function () {
screen.click();
startTime = new Date();
}, Math.floor(Math.random()) * 1000 + 2000);
cancleTime = setTimeout(function () {
startTime = new Date();
screen.click();
}, Math.floor(Math.random()) * 1000 + 2000);
이 두개의 차이가 있나요??
위에 순서로 하면 setTimeout이 작동을 안하고, 아래 순서로 하면 정상적으로 작동하네요,.





