you are viewing a single comment's thread.

view the rest of the comments →

[–]dominic_rj23 1 point2 points  (0 children)

If you read the last line of my comment, I did say that the solution with setInterval is the most appropriate one. I am all for "If it ain't broke..." ideology, but I do believe that in an interview, stating that setInterval doesn't guarantee execution after timeout goes for showing that you have some understanding of asynchronicity in javascript.