SyntaxFix
Write A Post
Hire A Developer
Questions
SetTimeout is used to make your set of code to execute after a specified time period so for your requirements its better to use setInterval because that will call your function every time at a specified time interval.