JavaScript Concept 7 - == and ===

What’s the difference between == and === ?

==
Checks for equality

===
Checks for equality and type

== in JavaScript sees both null and undefined as having no value eventhough they have different types

// checkout this badness
let foo // undefined
let temp = null // null

// compare the two
console.log(foo == temp) // true(boolean), what??

RossenaHuh
Written by@RossenaHuh
Fast learning Web Developer with interests in state-of-art technologies & a person who continuously seeks for diversity and better communications in life.

GitHub