Javascript - Advanced

Equals

”==” vs “===” AND “!=” vs “!==”

when two operands are of the same type and have the same value, then === produces true and !== produces false; when the operands are of the same type, but if they are of different types, == and != attempt to coerce the values

Example

100 == "100"  // true
100 === "100" // false

0 == ''   // true
0 === ''  // false

Quotes

double quotes “” vs single quotes ‘’

(You don’t need to escape single quotes in double quotes, or double quotes in single quotes)

Fork me on GitHub