Instructor: 00:01 Double equals will tell you if two things have the same value, and triple equals will tell you if two things have the same value and of the same type. Let's look at a few examples.
00:12 5 == 5 is true, but 5 == "5" is also true. What's happening here is that the string "5" is actually being coerced into a number by the double equals and then being checked against the number 5.
00:30 For triple equals, 5 === 5 is true, but 5 === "5" is false. That's where we can really see the difference between the double and the triple equals.
01:11 We also have to be careful with null and undefined, because null == undefined is true, but null === undefined is false.
01:22 One other note is that not a number is never equal to anything with either double or triple equals, including not a number.
01:32 All the same rules we just talked about also apply to !=, and !==, with the != having the same rules as == and !== having the same rule as ===.
01:48 The prevailing advice is to always use triple equals as much as possible, because using double equals can sometimes unknowingly get you into trouble.