const user = {
name: "Alice",
age: 25,
toJSON() {
return { name: this.name };
}
};
console.log(JSON.stringify(user)); Post #1566
953

Js Quiz JSON
- 🔥 4