Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2012 10:12
Show Gist options
  • Save anonymous/4292476 to your computer and use it in GitHub Desktop.
Save anonymous/4292476 to your computer and use it in GitHub Desktop.
String comparison in javascript can be tricky
'foo' === 'bar'
false
'foo' === 'foo'
true
!'foo' === 'foo'
false
!('foo' === 'foo')
false
!('foo' === 'bar')
true
!'foo' === 'bar'
false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment