Skip to content

Instantly share code, notes, and snippets.

@jonsullivan
Created March 9, 2012 00:30
Show Gist options
  • Save jonsullivan/2004331 to your computer and use it in GitHub Desktop.
Save jonsullivan/2004331 to your computer and use it in GitHub Desktop.
javascript equality
var obj1 = obj2 = {}; obj1 == obj2;
true
var obj1 = obj2 = {}; obj1 === obj2;
true
var obj1 = {}; var obj2 = {}; obj1 === obj2
false
var obj1 = {}; var obj2 = {}; obj1 == obj2
false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment