Tuesday, 30 October, 2018 UTC


Summary

Both double equals `==` and triple equals `===` can be used to compare values in javascript - but they are different in a subtle, but very important way. Double equals `==` compares just the _value_ of two things - and if the types are different, it will use type coercion to match the types before comparing. Triple equals `===` compares both the _type_ and _value_ of objects, and both must match before two values are equal. The same rules apply for not equal `!=` (compare value only) and not equal, equal `!==` (compare type and value).