How to compare objects in JavaScript (ES6)

Published: 22 August 2018
on channel: ChirpingmermaidCodes
1,412
29

Given two matrices (array of arrays, nested any level deep), write a function that will return true if the contents are the same, and false if not.

Since JavaScript objects cannot be compared using the == operator, unless we are checking if they are actually the exact same object in memory, we need to write our own function to check if the contents of an object are the same.

Please let me know if you have any questions, if I've made any mistakes, or if you have a better solution. Thanks for watching!

https://github.com/ChirpingMermaid/CTCI


On this page of the site you can watch the video online How to compare objects in JavaScript (ES6) with a duration of hours minute second in good quality, which was uploaded by the user ChirpingmermaidCodes 22 August 2018, share the link with friends and acquaintances, this video has already been watched 1,412 times on youtube and it was liked by 29 viewers. Enjoy your viewing!