Skip to content

Instantly share code, notes, and snippets.

@RodolfoSilva
Last active February 4, 2018 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RodolfoSilva/9049274 to your computer and use it in GitHub Desktop.
Save RodolfoSilva/9049274 to your computer and use it in GitHub Desktop.
diferenca-entre-settimeout-e-setinterval-1
// Executa o evento a cada 10 segundos
setInterval(() => console.log('setInterval'), 10000);
// Executa o evento depois de 5 segundos
setTimeout(() => console.log('setTimeout'), 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment