- Comparison by Value
let a = 'hello'; let b = a; console.log(a==b); // true console.log(a===b); // true
let a = 'hello'; let b = 'hello'; console.log(a==b); // true console.log(a===b); // true
- Comparison by Reference
let a = {}; let b = a; console.log(a==b); // true console.log(a===b); // true
let a = {}; let b = {}; console.log(a==b); // false console.log(a===b); // false