== 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
....
Written by Melanie Archer
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Related Tags
#ruby
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#