js setTimeout inside of setInterval code example
Example: difference between setTimeout() and setInterval()
.setTimeout() //executes the code after x seconds.
.setInterval() //executes the code **every** x seconds.
.setTimeout() //executes the code after x seconds.
.setInterval() //executes the code **every** x seconds.