JSFiddle - React, Tailwind, and code Playground

by deepak sisodiya

HTML

== is normal equality 
 it will check the values of variable and convert them to a common type and returns true if both are equals. So comparing number with string having the same value will return true.
=== is strict equality
three equals not made the implicit conversion so it not only compare values but also the type of variable that's why it is also called strict comparison.

JavaScript

var alert  = function (str) {
   var st = document.createTextNode(str);
   var p = document.createElement('p');
   p.appendChild(st);
   document.querySelector('body').appendChild(p);
}

alert(23 == "23"); // true  number to string
alert(1 == true); // true  boolean to number

alert(23 === "23"); // false  
alert(1 === true); // false