I was curious that what does setTimeout return. So I did a quick test:
var thing = setTimeout(function(){},1);
And what surprise me is that it gave me a number. 1351
Each time is different.
So is it really all it returns is a number? So I can actually do this as well?
clearTimeout(1351);
Very confusing...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…