JS: Difference between == & ===
When we want to compare two values in javascript, our first instinct is to use "==".Example:
let a = 5;
let b = 7;
console.log(a==b) //false
But there is another type of equality operator which is stricter than "==". This operator is "===".
"==" ope...
kamiya.hashnode.dev3 min read
Lukas Gaučas
Turtle is always a winner
Missing some TL;DR:
==for values (auto type conversion between comparisons are done internally) , whereas===for type AND value, whereas type takes precedence over value, if type does not match to, it short-circuits which leads to optimisation whatsoever .Please correct if I am wrong . Thank you .