Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

212
Vistas
var max = setTimeout(";"); can clear all setTimeout events ,but i'm can understand the code
var max = setTimeout(";");
for (var i=1; i< max; i++) clearTimeout(i);

I'm found the code in stack overflow can to clear all setTimeout events,

but how to understand var max = setTimeout(";");? What mean is it?

Here is original question => How to stop all timeouts and intervals using javascript?

Thank you!

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

setTimeout returns a numeric ID which can be used to clear the timeout.

Creating a new timeout creates a new ID.

This code assumes that IDs will always be issued in sequential order (although I'm not aware of any implementation which doesn't).

about 4 years ago · Juan Pablo Isaza Denunciar

0

It simply creates empty timeout. And since setTimeout returns it's reference as incremented value, that way you can tell how much timeouts there is on page

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda