Skip to content

Instantly share code, notes, and snippets.

@harryadel
Created August 28, 2016 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harryadel/37829af90aab86dbd47c68ea9f4e2d34 to your computer and use it in GitHub Desktop.
Save harryadel/37829af90aab86dbd47c68ea9f4e2d34 to your computer and use it in GitHub Desktop.
/*
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