I got this javaScript test but I can´t explain why the console give the answer it is giving. Can anyone explain this?
const obj1 = { c: 'c' };
const obj2 = { a: 1, b: [1], c: obj1 };
const obj3 = { a: 1, b: [1], c: obj1 };
console.log(obj2 === obj3);
console.log(obj2.a === obj3.a);
console.log(obj2.b === obj3.b);
console.log(obj2.c === obj3.c);
Output
false
true
false
true