Select Page

Booleans are true and false

let Bob = 20;

Bob === 19   //outputs False
Bob === 20  // outputs True

NEVER USE == 
ALWAYS USE ===

Why?

Triple === will check the value on the left and right are the same value and the same type

“10” == 10  //  this will give me a True, because it is only checking the Values of each.

“10” === 10 // this will give me a False, because it is checking the value, and the typeof