[Javascript] setInterval v.s. setTimeout




setInterval 會反覆的執行。
setTimeout 只會執行一次。

如果要讓程式反覆執行,有下面兩種彈性的作法:

參考資料:




Be the first to comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.