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

170
Vistas
Forced and premature exit from recursion (investigate) in JavaScript (+React)

I have an interesting desire to know a way to break the recursion before it "freezes" the browser and exhausts all resources.

A banal example is just such a cycle:

while (true) {
    console.log('Test');
}

After a few seconds, the browser already becomes unmanageable, and after a few minutes it restarts. You can see this error too:

net::ERR_INSUFFICIENT_RESOURCES

QUESTION: Is it possible to somehow track the execution of recursion in order to stop it at the worst moment and return the browser to working capacity? At the same time, I want this to be a universal method, since the browser resources are different (I mean that exit after the nth iteration or second will not work here).

about 4 years ago · Juan Pablo Isaza
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