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

I don't think there's a sleep command in Javascript. It is against the "entire browser runs in a single thread" model, and it would make no sense up to very recently before promises were created (what it would do? start a call-back?).

If the question is from somebody with extensive experience in JS, that's a clear red flag (I don't have any extensive experience in JS). If it's from somebody with passing experience, it's not that bad. That said, I have no idea how to call sleep in any of the ~4 languages I'm currently using either.




They wanted the sleep command...so they could wait for an XHR to complete. So in context, it was a pretty massive red flag.




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

Search: