Coercion is the phenomenon that implicitly converts a value from one primitive type to another. Many times we need to convert a particular data type to another data type. If you have programmed in C/C++ or Java, you are more likely to encounter type casting where you have to convert a variable from one type to another.
let a = 1, b = 2; console.log(a+b); // returns 1 + 2 = 3
Now, what if we try to add one string and one integer ?
let a = '1'; let b = 2; console.log(a+b); // returns 12
let a = '1'; let b = '2'; console.log(a + b); // returns 12
if ( 1 == '1' ) console.log('true'); else console.log('false');
if ( 1 === '1' ) console.log('true'); else console.log('false');