Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumTypeScriptcontrol-flow analysis pitfallsSingle-choice MCQ

Which is the type of x?

function fn(x: string | number) { if (typeof x === "string") {} else if (typeof x === "number") {} else { x } }