Last Updated: February 25, 2016
·
345
· mejarc

== and ===

You're writing in Ruby. Crockford isn't here. Time to lose that reflexive triple-equals.

# Testing whether a is equal in value to b
if a == b

# Remarkably confusing operator that you might as well
# assume has no equivalent in JS. Just forget that they
# look the same.
# Testing where a in a case statement is equal in value to b

 case obj
 when a === b
 ....