Skip to content

Instantly share code, notes, and snippets.

@chrislaughlin
Created January 2, 2017 22:38
Show Gist options
  • Save chrislaughlin/42e061e7dd82c7db4548321d4b79fb61 to your computer and use it in GitHub Desktop.
Save chrislaughlin/42e061e7dd82c7db4548321d4b79fb61 to your computer and use it in GitHub Desktop.
objectEqualityAssignment
const chris1 = {
name: 'Chris',
location: 'Belfast'
}
const chris2 = {
name: 'Chris',
location: 'Belfast'
}
console.log(chris1 === chris2); //false
console.log(chris1 == chris2); //false
const chris3 = chris2;
console.log(chris3 == chris2); //true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment