Created
February 5, 2020 06:05
-
-
Save hsh2001/653348d19e171ab876415c2d234cc412 to your computer and use it in GitHub Desktop.
Check object is same
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
function isSameObject(a, b) { | |
if (a === b) return true; | |
for (let key in a) { | |
if (a[key] !== b[key]) return false; | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment