When you construct object and array literals, they are different values, and they should not be equal to each other. Try:
let sameRefNaN = NaN;
let sameRefObject = {};
let sameRefArray = [];
sameRefNaN === sameRefNaN; // false
sameRefObject === sameRefObject; // true
sameRefArray === sameRefArray; // true