Concept Flow - Type narrowing with typeof
Start with variable of union type
Check typeof variable
Narrow to string
Use string methods
End
We start with a variable that can be multiple types. Using typeof checks its actual type at runtime, then we safely use methods or operations for that specific type.