Loose and Strict Comparisons
Loose Comparison '==' allows us to compare two or more operands by converting their value to a common type first and then checking for the equality between them.
Strict Comparison '===' allows us to compare two or more operands by checking the equality between the values as well as their types . It returns true only if the values and the type both match with the other operand.
let age = 25;
//loose comparison (different types can still be equal)
console.log(age == 25);
//result: true
console.log(age == '25');
//result: true
console.log(age != 25);
//result: false
console.log(age != '25');
//result: false
//strict comparison (different types cannot be equal)
console.log(age === 25);
//result: true
console.log(age === '25');
//result: false
console.log(age !== 25);
//result: false
console.log(age !== '25');
//result: true