circular reference

When objects refer to each other in a loop, such as a parent pointing to a child that points back to the parent.

In more detail

A DOM element that points to its parent, which lists it as a child, is a common example. JSON.stringify throws on them; structuredClone and mark-and-sweep garbage collection both handle them correctly.

Related terms

Taught in

References