what is == and === in javascript code example
Example 1: difference between == and === in javascript
0 == false
0 === false
1 == "1"
1 === "1"
null == undefined
null === undefined
'0' == false
'0' === false
Example 2: what is == in js
var stage = "begin";
if (stage == "begin") {
Bot.send ("Hello User!");
}
Example 3: js ===
5 =='5'
5 === '5'
Example 4: === in js
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
var x = abc;
document.getElementById("demo").innerHTML = (x === "ABC");
</script>
</body>
</html>