$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · hard · #172

What is the output?

const a = { x: 1 };
const b = { x: 1 };
console.log(a == b, JSON.stringify(a) === JSON.stringify(b));
  1. false true
  2. true true
  3. false false
  4. true false
Objects compare by reference; their serialised forms are identical strings.
Play Problem Solving ▸