Created
August 28, 2016 12:13
-
-
Save harryadel/37829af90aab86dbd47c68ea9f4e2d34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
My answer for exercise 'Deep comparison' | |
in Eloquent JavaScript Second Edition | |
Chapter 4 Data Structures: Objects and Arrays | |
*/ | |
function deepEqual(o1, o2) { | |
if(JSON.stringify(o1) === JSON.stringify(o2)) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment