79262308

Date: 2024-12-08 11:09:40
Score: 0.5
Natty:
Report link

A real-world example of circular reference

const person1 = {
  name: "x",
  age: 28,
};

const person2 = {
  name: "y",
  age: 26,
};

person1.spouse = person2;
person2.spouse = person1;

console.log(JSON.stringify(person1)); // will throw the error
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Hypermona