V
V
Viktor2018-10-03 06:13:48
JavaScript
Viktor, 2018-10-03 06:13:48

How to recursively traverse an object without going into cyclic references?

How to go through all the properties of an object and the properties of all objects nested in it exactly 1 time?

let a = { }
let b = {  parent:a}
let c = {  parent:a}
a.parent = c

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
profesor08, 2018-10-03
@Levhav

Keep track of visited links and check every time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question