How to avoid race conditions using asynchronous JavaScript | Hacker News Reader