If I have a function which I would like my js code to run it immediately but after the run, wait for 2 seconds. How to achieve this logic?
(Note: It is just the inverse logic compare with setTimeout()
, since setTimeout(
) first wait a certain amount of time then execute the function.)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…