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

420
Vistas
Is there a maximum depth level for nested objects in Javascript?

Javascript has no problems with nesting an object within itself, i.e. if you have an object A, you can pass it as a property on object A:

const nested = {};
nested.name = "hi";
nested.child = nested;

console.log(nested, nested.child, nested.child.child, "... and so on");

If you run this in the browser console, you can actually keep expanding the child property until... infinity?

Is there a limit to how deep objects an be nested, and what is it?

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

0

No, there is no limit and you can freely nest further. But, if you keep consolelogging nested objects in nested objects and so on, the program would slow down due to limited memory.

about 4 years ago · Juan Pablo Isaza Denunciar

0

There's no limit in the Javascript specification.

If you wanted to find a particular limit in a particular JS engine, you'd have to code a test and see if you could find a limit and running into a limit would probably not be related at all to nesting, but just to number of objects and memory used by them.

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