Use the == operator only when checking for null or undefined. In all other cases, use === for strict equality.

For example:

1
2
if(obj.a == null){}

is equivalent to:

1
2
if (obj.a === null || obj.a === undefined) {}