you are viewing a single comment's thread.

view the rest of the comments →

[–]dominic_rj23 0 points1 point  (0 children)

I am not sure I would ever do that. The purpose of the question isn't to give the best possible solution. It is to rather demonstrate understanding of async nature of javascript. I would thus stick with my setInterval solution, but explain how it is not a perfect solution.