Hacker News new | past | comments | ask | show | jobs | submit login

Looking at the starting example, I thought "script start" should happen first. "promise2" should be after "promise1", but the rest seem arbitrary, and you shouldn't be writing code where it would matter.



When you’re writing UI frameworks, the differences are regularly essential to understand.


The setTimeout(..., 0) is important to be able to force things to be at the end of the queue after the current task completes. So if you are going to batch requests, your current task can create a bunch that all queue somewhere, and then setTimeout(..., 0) can be used to dispatch them all at once.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: