An interview question, the question about the object, has not been solved.

    var foo = { n: 1 };
    var bar = foo;
    foo.x = foo = { n: 2 };
    console.log(foo.x)//undefined
The value of

foo.x is undefined,. Please explain

.
Feb.27,2021

the Nikkei question has been asked by SF many times.

javascript connection assignment

Menu