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?
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.
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.