This example shows how TypeScript uses truthiness narrowing to safely work with variables that can be string, null, or undefined. The function greet takes a variable 'name' which might be a string or null or undefined. The if statement checks if 'name' is truthy. If yes, TypeScript narrows the type to string, so we can safely call toUpperCase() on it. If not, the else block runs, greeting a guest. The execution table shows different inputs and how the condition evaluates, what type narrowing happens, and what output is produced. Key moments clarify why empty string is falsy and how narrowing prevents errors. The quiz tests understanding of type narrowing and truthiness checks. This helps beginners see how TypeScript uses runtime checks to narrow types and avoid errors.