showing results for - "5 2 2 strict equality with 3d 3d 3d"
Maria
16 Jan 2020
1/*The operator === compares two operands without converting their data
2types. In other words, if a and b are of different data types (say, a is
3a string and b is a number) then a === b will always be false.*/
4
5console.log(7 === "7");
6console.log(0 === false);
7console.log(0 === '');
8
9//false
10//false
11//false 
12
13/*For this reason, the === operator is often said to measure strict 
14equality.
15
16Just as equality operator == has the inequality operator !=, there is 
17also a strict inequality operator, !==. The boolean expression 
18a !== b returns true when the two operands are of different types, 
19or if they are of the same type and have different values.
20
21Tip
22USE === AND !== WHENEVER POSSIBLE. In this book we will use these 
23strict operators over the loose operators from now on.*/