== is the equality operator and is used to compare two values. It doesn’t check the data type of the two values being compared. For example:

let a = 10;
let b = “10”;
a == b // returns true

=== is the strict equality operator and is used to compare two values. It checks the data type of the two values being compared. For example:

let a = 10;
let b = “10”;
a === b // returns false

Leave a Reply

Your email address will not be published. Required fields are marked *