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

What is the output?

const a = {};
const b = {};
console.log(a == b);
  1. false
  2. true
  3. undefined
  4. TypeError
Objects compare by reference, and these are two distinct objects.
Play Problem Solving ▸