javascript setinterval and settimeout difference 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.