cf.completefrontend

Predict the outputHard

How do ===, Object.is, and string conversion treat -0?

What does this log?
const zero = -0;
console.log(zero === 0);
console.log(Object.is(zero, 0));
console.log(1 / zero);
console.log(zero);
console.log(String(zero));
console.log(JSON.stringify(zero));
console.log(Math.round(-0.4));
console.log(zero + 0);

The answer

Work out every line it logs, in order. Then check.

Checking your sign-in…