let obj1 = { name: "John", age: 30, city: "New York" };
let obj2 = { name: "John", age: "30", city: "New York" };
let obj3 = { name: "John", city: "New York", age: 30 };
console.log(JSON.stringify(obj1) === JSON.stringify(obj2)); // false
console.log(JSON.stringify(obj1) === JSON.stringify(obj3)); // false
view raw diffExamples.js hosted with ❤ by GitHub