Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyTypeScriptunion and literal typesSingle-choice MCQ

Which is the inferred type for x?

function f(x?: string) { /* x has type string | undefined */ }