<script>
const cricketer1 = { name: 'Dhoni', Career_Stats: { runs: 10549, ipl: { Trophies: 3, }, }, }; const cricketer2 = { name: 'Dhoni', Career_Stats: { runs: 10549, ipl: { Trophies: 3, }, }, }; // Using JavaScript document.write(JSON.stringify(cricketer1) === JSON.stringify(cricketer2)); // truelet obj1 = { c: 1 };
let obj2 = { c: 1 };
let obj1 = { c: 1 };
let obj2 = obj1;
console.log(obj1 === obj2); // Output: true
No comments:
Post a Comment