Can you still?

What's the output?

const name = 'Lydia Hallie';

console.log(!typeof name === 'object');
console.log(!typeof name === 'string');

You missed this one before

typeof name returns "string". The string "string" is a truthy value, so !typeof name returns the boolean value false. false === "object" and false === "string" both returnfalse.

(If we wanted to check whether the type was (un)equal to a certain type, we should've written !== instead of !typeof)

Question 122 · see the original (opens in a new tab)