← #39 Log a variable in an arrow function
#40

Use the strict equality operator when comparing variables

Topics: JavaScript

When checking whether two given variables equal to each other, always use the strict equality (===) instead of the equality (==) operator.

The === operator not only checks the values, but also the types of variables. It's safer then == which performs type conversions before comparing the values.

0 == false;         // true
0 === false; // false

0 == []; // true
0 === []; // false

0 == ''; // true
0 === ''; // false

You can take a look at == vs === to see more examples.

Fix a typo or suggest an improvement
#41 Manage multiple boolean flags