Skip to content

Instantly share code, notes, and snippets.

@alyssaq
Created September 25, 2013 18:10
Show Gist options
  • Save alyssaq/6703645 to your computer and use it in GitHub Desktop.
Save alyssaq/6703645 to your computer and use it in GitHub Desktop.
Javascript Equality

The identity (===) operator behaves identically to the equality (==) operator except no type conversion is done, and the types must be the same to be considered equal.

0 == '0' //true. '0' was type converted to integer
0 === '0' //false. As expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment