QuizIntermediate
typeof Guards for Primitives
Learn how the typeof operator narrows a value to a specific primitive type.
Inside `if (typeof x === "string")`, what type does TypeScript narrow `x: string | number` to within the block?
Learn how the typeof operator narrows a value to a specific primitive type.
Inside `if (typeof x === "string")`, what type does TypeScript narrow `x: string | number` to within the block?