Both operate on comparisons. The distinction between the two operators is that while "==" compares values, " === compares both values and types.
read also : A powerpoint presentation's encryption: adding it
Example:
var x = 2;
var y = "2";
(x == y) // Returns true since the value of both x and y is the same
(x === y) // Returns false since the typeof x is "number" and typeof y is "string"
Top comments (2)
Nice, simplified explanation. However, comparing 'values' is a whole topic in itself 🤓
Great comparison