QuizIntermediate
Narrowing via Assignment
See how assigning a value updates the narrowed type of a variable.
Given `let x: string | number`, immediately after `x = 42;`, what type does TypeScript infer for `x`?
See how assigning a value updates the narrowed type of a variable.
Given `let x: string | number`, immediately after `x = 42;`, what type does TypeScript infer for `x`?