Nick Gard
Sep 10, 2021

--

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

--

--

Nick Gard
Nick Gard

Written by Nick Gard

Web Developer, Oregonian, husband

No responses yet